feat(editor): WPHM JSON round-trip closure

Adds --export-wphm-json / --import-wphm-json with the established
readEnumField template factoring int+name dual encoding for the
movementState enum ("idle"/"walk"/"run"/"swim"/"fly"/"sit"/
"mount"/"death").

Both encoding paths verified live: stripped the int field from
exported JSON and re-imported using only the string token —
result byte-identical to the int-keyed form. All 3 presets
(human / orc / undead) byte-identical binary roundtrip OK
preserving Undead shambling variant 38 on Run state and slower
swim transition (400ms vs 350ms for living races).

CLI flag count 1344 -> 1346.
This commit is contained in:
Kelsi 2026-05-10 03:47:03 -07:00
parent 949a6e0182
commit 2a28d3c1cd
3 changed files with 173 additions and 0 deletions

View file

@ -391,6 +391,7 @@ const char* const kArgRequired[] = {
"--export-wspk-json", "--import-wspk-json",
"--gen-phm-human", "--gen-phm-orc", "--gen-phm-undead",
"--info-wphm", "--validate-wphm",
"--export-wphm-json", "--import-wphm-json",
"--gen-weather-temperate", "--gen-weather-arctic",
"--gen-weather-desert", "--gen-weather-stormy",
"--gen-zone-atmosphere",