feat(editor): add WSTC JSON round-trip (--export/--import-wstc-json)

Closes the editing loop on the hunter-stable-slot catalog: dump
a .wstc to JSON, hand-edit displayOrder / minLevelToUnlock /
copperCost / isPremium (e.g. lower the lvl 50 stable slot 4
unlock to lvl 45, mark slot 5 as premium for a donor server,
raise slot 3 cost from 2g to 5g for a tighter economy),
re-import to a byte-identical binary.

isPremium dual-encoded: bool OR int (machine-generated sidecars
work too). All other fields are scalar so no special handling
needed.

Verified byte-identical round-trip on all three presets
(std / cata / premium). CLI flag count 1074 -> 1076.
This commit is contained in:
Kelsi 2026-05-10 00:00:43 -07:00
parent 8f6f6ac91e
commit 68c20bd152
3 changed files with 122 additions and 0 deletions

View file

@ -287,6 +287,7 @@ const char* const kArgRequired[] = {
"--export-whld-json", "--import-whld-json",
"--gen-stc", "--gen-stc-cata", "--gen-stc-premium",
"--info-wstc", "--validate-wstc",
"--export-wstc-json", "--import-wstc-json",
"--gen-weather-temperate", "--gen-weather-arctic",
"--gen-weather-desert", "--gen-weather-stormy",
"--gen-zone-atmosphere",