feat(editor): add WSKP JSON round-trip (--export/--import-wskp-json)

No enum coercion (all-numeric payload). Pct/raw dual
encoding for cloudSpeedX10: stored on disk as raw uint8
(0..255 = 0..25.5 mph) for byte-precision round-trip,
exported with both forms — cloudSpeedX10 (raw int,
authoritative) and cloudSpeedMph (float, derived).
Import accepts either form; pct conversion clamps to
0..255 with rounding.

This is the same dual-encoding pattern WHRD uses for
bonusQualityChance — get byte-identical round-trip from
binary AND human-friendly editing in JSON. cloudOpacity
stays as raw 0..255 since percent conversion would lose
precision (cloudOpacity=78 doesn't round-trip cleanly
through %.2f display).

All 3 presets (stormwind/arctic/hellfire) byte-
identical roundtrip OK. CLI flag count 1260 -> 1262.
This commit is contained in:
Kelsi 2026-05-10 02:53:18 -07:00
parent 0016b0d597
commit 9a734acb87
3 changed files with 144 additions and 0 deletions

View file

@ -367,6 +367,7 @@ const char* const kArgRequired[] = {
"--export-wlma-json", "--import-wlma-json",
"--gen-skp", "--gen-skp-arctic", "--gen-skp-hellfire",
"--info-wskp", "--validate-wskp",
"--export-wskp-json", "--import-wskp-json",
"--gen-weather-temperate", "--gen-weather-arctic",
"--gen-weather-desert", "--gen-weather-stormy",
"--gen-zone-atmosphere",