feat(editor): add WEMO JSON round-trip (--export/--import-wemo-json)

Dual encoding for all 3 WEMO enums on import: emoteKind
(int OR "social"/"combat"/"roleplay"/"system"), sex
("both"/"male"/"female"), ttsHint ("talk"/"whisper"/"yell"/
"silent"). Reuses the readEnumField template pattern from
WMSP so the 3 enums share one parser body.

Also escapes a stray %s in the validate-wemo help text
that gcc -Wformat had been flagging as a missing-argument
warning. The literal "%s" appears inside the warning
description string so it must be encoded as %%s for
printf to render the helptext glyph correctly.

All 3 presets (basic/combat/rp) byte-identical roundtrip
OK. Token-form import smoke-tested with mixed roleplay +
female + whisper. CLI flag count 1131 -> 1133.
This commit is contained in:
Kelsi 2026-05-10 01:06:59 -07:00
parent c9b822002f
commit dc0c71fdd7
3 changed files with 204 additions and 1 deletions

View file

@ -312,6 +312,7 @@ const char* const kArgRequired[] = {
"--export-wmsp-json", "--import-wmsp-json",
"--gen-emo", "--gen-emo-combat", "--gen-emo-rp",
"--info-wemo", "--validate-wemo",
"--export-wemo-json", "--import-wemo-json",
"--gen-weather-temperate", "--gen-weather-arctic",
"--gen-weather-desert", "--gen-weather-stormy",
"--gen-zone-atmosphere",