feat(editor): add WANV JSON round-trip (--export/--import-wanv-json)

Dual encoding for both WANV enums via the readEnumField
template: eventKind (int 0..6 OR 255 OR token "holiday"
/ "anniversary" / "doublexp" / "doublehonor" /
"petbattle" / "bgbonus" / "seasonalquest" / "misc") and
recurrenceKind (int 0..3 OR token "yearly" / "monthly"
/ "weekly" / "oneoff").

The polymorphic startDay field (1..31 day-of-month for
Yearly/Monthly/OneOff vs 0..6 weekday for Weekly) is
serialized as a plain int — operators editing JSON
need to know the recurrenceKind context to interpret
the value, which the validator already enforces on
import.

All 3 presets (holidays / weekly bonus / anniversary)
byte-identical roundtrip OK. CLI flag count 1274 ->
1276.
This commit is contained in:
Kelsi 2026-05-10 03:04:51 -07:00
parent 0df50f9f72
commit 3e14b7b5b1
3 changed files with 195 additions and 0 deletions

View file

@ -373,6 +373,7 @@ const char* const kArgRequired[] = {
"--export-wcfg-json", "--import-wcfg-json",
"--gen-anv", "--gen-anv-bonus", "--gen-anv-launch",
"--info-wanv", "--validate-wanv",
"--export-wanv-json", "--import-wanv-json",
"--gen-weather-temperate", "--gen-weather-arctic",
"--gen-weather-desert", "--gen-weather-stormy",
"--gen-zone-atmosphere",