1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-30 06:56:10 +00:00

Background + clean

This commit is contained in:
Yan Maniez 2020-03-01 21:30:33 +01:00
parent 28fd23b2d1
commit dece242a54
3 changed files with 169 additions and 82 deletions

View file

@ -205,6 +205,26 @@ class RaceItems extends FilteredItems {
}
}
class BackgroundItem extends Item {
String skillProficiencies;
String masteredTools;
String masteredLanguages;
String equipment;
BackgroundItem(Map<String, dynamic> map) : super(map) {
this.skillProficiencies = map["SkillProficiencies"];
this.masteredTools = map["MasteredTools"];
this.masteredLanguages = map["MasteredLanguages"];
this.equipment = map["Equipment"];
}
}
class SubBackgroundItem extends BackgroundItem {
SubBackgroundItem(Map<String, dynamic> map) : super(map);
}
Item itemFromMap(Map<String, dynamic> map) {
switch (map["ItemType"]) {
case "RaceItem":
@ -213,6 +233,10 @@ Item itemFromMap(Map<String, dynamic> map) {
return SubRaceItem(map);
case "RaceItems":
return RaceItems(map);
case "BackgroundItem":
return BackgroundItem(map);
case "SubBackgroundItem":
return SubBackgroundItem(map);
case "MonsterItem":
return MonsterItem(map);
case "MonsterItems":