Add armor and tools

This commit is contained in:
2025-09-24 23:54:20 -05:00
parent 031aeded8f
commit 22e529f222
11 changed files with 404 additions and 22 deletions

View File

@@ -43,6 +43,12 @@
if (save.Amulets != null && save.Amulets.Count > 0) {
this.Amulets = new(save.Amulets);
}
if (save.Tools != null && save.Tools.Count > 0) {
this.Tools = new(save.Tools);
}
if (save.Armor != null && save.Armor.Count > 0) {
this.Armor = new(save.Armor);
}
}
}
@@ -60,6 +66,8 @@
Wands = this.Wands?.Export() ?? [],
Spellbooks = this.Spellbooks?.Export() ?? [],
Amulets = this.Amulets?.Export() ?? [],
Tools = this.Tools?.Export() ?? [],
Armor = this.Armor?.Export() ?? [],
};
YamlOptions.SerializeToFile(fileName, save);
@@ -75,6 +83,8 @@
this.Wands = null;
this.Spellbooks = null;
this.Amulets = null;
this.Tools = null;
this.Armor = null;
this.Intrinsics = new();
}
@@ -88,6 +98,8 @@
public IdentificationRecord? Wands { get; set; }
public IdentificationRecord? Spellbooks { get; set; }
public IdentificationRecord? Amulets { get; set; }
public IdentificationRecord? Tools { get; set; }
public IdentificationRecord? Armor { get; set; }
}
public struct ItemRecord {
@@ -127,6 +139,8 @@
public List<ItemRecord> Wands { get; set; } = new();
public List<ItemRecord> Spellbooks { get; set; } = new();
public List<ItemRecord> Amulets { get; set; } = new();
public List<ItemRecord> Tools { get; set; } = new();
public List<ItemRecord> Armor { get; set; } = new();
}
public class Intrinsics {