Snapshot for release 2026.10.28.2 (internal 48c46bd)

This commit is contained in:
Tom Bohar 2026-10-28 19:47:19 -04:00
commit 636adfcef2
41 changed files with 3402 additions and 120 deletions

View file

@ -83,6 +83,12 @@ internal sealed class DefStore
slot.Item = ParseRef(e, "item");
int mode = Int(e, "mode", 0);
slot.Mode = mode >= 0 && mode <= (int)UseMode.Equip ? (UseMode)mode : UseMode.Auto;
// A spell (2026-10-28; a file from before has none): only in a slot without an item.
if (slot.Item == null && e.TryGetProperty("spell", out JsonElement sp) && sp.ValueKind == JsonValueKind.Object)
{
slot.SpellId = UInt(sp, "id");
slot.SpellName = slot.SpellId != 0 ? Str(sp, "name") : string.Empty;
}
}
}
ParseRefs(root, "favourites", d.Favourites, DefData.MaxFavourites);
@ -167,6 +173,13 @@ internal sealed class DefStore
{
w.WriteStartObject();
if (slot.Item != null) WriteRef(w, "item", slot.Item);
else if (slot.SpellId != 0)
{
w.WriteStartObject("spell");
w.WriteNumber("id", slot.SpellId);
w.WriteString("name", slot.SpellLabel);
w.WriteEndObject();
}
w.WriteNumber("mode", (int)slot.Mode);
w.WriteEndObject();
}