feat(editor): WGBK JSON round-trip closure

Adds --export-wgbk-json / --import-wgbk-json. Fixed-size
8-element perRankWithdrawalLimit array serializes as JSON int
array; kUnlimited (0xFFFFFFFF / 4294967295) preserved through
JSON. All 3 presets (standard/raid/small) byte-identical binary
roundtrip OK including the raid preset's tier-tab strict rank-1
4-slot/day caps.

Live-tested per-rank monotonicity validator: hand-mutated
General tab rank 2 (member) limit to 200 (exceeds rank 1
officer cap of 50). Validator correctly errored:
"perRankWithdrawalLimit[2]=200 > rank[1]=50 — lower rank
cannot exceed higher rank's withdrawal cap". Exact rank indices
+ values appear in the message — actionable for the editor.

CLI flag count 1380 -> 1382.
This commit is contained in:
Kelsi 2026-05-10 04:17:37 -07:00
parent 98316b48ac
commit 25ecdb0813
3 changed files with 134 additions and 0 deletions

View file

@ -403,6 +403,7 @@ const char* const kArgRequired[] = {
"--export-wcst-json", "--import-wcst-json",
"--gen-gbk", "--gen-gbk-raid", "--gen-gbk-small",
"--info-wgbk", "--validate-wgbk",
"--export-wgbk-json", "--import-wgbk-json",
"--gen-weather-temperate", "--gen-weather-arctic",
"--gen-weather-desert", "--gen-weather-stormy",
"--gen-zone-atmosphere",