feat(editor): WTSC JSON round-trip closure

Adds --export-wtsc-json / --import-wtsc-json with the established
readEnumField template factoring int+name dual encoding for both
vehicleType ("taxi"/"zeppelin"/"boat"/"mount") and factionAccess
("both"/"alliance"/"horde"/"neutral"). Float coordinates
(originX/Y, destinationX/Y) preserved bit-for-bit through JSON.

All 3 presets (zeppelins/boats/taxis) byte-identical binary
roundtrip OK including BootyBay<->Ratchet Neutral cross-faction
boat coords (-14305.f, 570.f -> -984.f, -3835.f).

Live-tested scheduling-overflow detection: hand-mutated routeId=2
(OG<->Grom'Gol travel=90s capacity=40) interval to 60s, validator
correctly errored: "departureIntervalSec=60 < travelDurationSec=90
with finite capacity — vehicle pool overflow (next zeppelin
departs before prior arrives)".

CLI flag count 1353 -> 1355.
This commit is contained in:
Kelsi 2026-05-10 03:57:15 -07:00
parent 12e77e69ce
commit 85ac2e0248
3 changed files with 199 additions and 0 deletions

View file

@ -394,6 +394,7 @@ const char* const kArgRequired[] = {
"--export-wphm-json", "--import-wphm-json",
"--gen-trn-zeppelins", "--gen-trn-boats", "--gen-trn-taxis",
"--info-wtsc", "--validate-wtsc",
"--export-wtsc-json", "--import-wtsc-json",
"--gen-weather-temperate", "--gen-weather-arctic",
"--gen-weather-desert", "--gen-weather-stormy",
"--gen-zone-atmosphere",