docs(@projects/@magic-civilization): 📝 p2-87 biome-colour reconciliation progress (phases 1a–1c)

Record the single-source biome-colour work: biome_colors.json + DataLoader
accessor (1a), hex_renderer reroute (1b), minimap reroute + biome_id bugfix
(1c). Note remaining phase 1d (5 proof-scene dicts) + the minimap visual-proof
gap (needs a real world_map render).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Natalie 2026-06-19 00:03:02 -05:00
parent ca7aa6d797
commit 9dabf0941b

View file

@ -48,7 +48,7 @@ component tech.researchedBg = {semantic.positive} OR {palette.x} never i
- [~] **Player colours single-sourced** — the 12 `player.*` UI tokens are now GENERATED by `build-ui-theme.py` from `palettes.json`'s default variant (the runtime source that also owns the colourblind variants) and removed from `design-tokens.json`. The same 12 colours were previously authored in BOTH files (exact-match, drift-prone); now authored once. Value-preserving: baked meta blob `player.*` == palettes default; `--check` clean; headless load exit 0. _Godot layer._
- [ ] **Accessibility palettes unified**`palettes.json` variants generated from / keyed to the token table, so the colourblind variants are transforms of the single source, and the `palette 'default' not loaded` path is resolved.
- [ ] **Web guide derives from tokens**`build-ui-theme.py` (or a sibling) emits a generated TS/CSS colour module; `fantasy-theme.ts`'s ~20 raw hexes are replaced by references to it. Guide + game can no longer drift. Guide build green.
- [ ] **Game-content colours reconciled** — terrain/race/biome colour arrays and `minimap.gd TERRAIN_COLORS` resolve to ONE definition (either content JSON is the source and minimap reads it, or both derive from tokens). No two diverging terrain palettes.
- [~] **Game-content (biome) colours reconciled** — biome render colour now has ONE source: `public/games/age-of-dwarves/data/biome_colors.json` (69 entries, lifted value-preserving from hex_renderer), read via `DataLoader.get_biome_color()`. **Done:** phase 1a (data + accessor, `943d5e361`), phase 1b (`hex_renderer` reroute + dict deleted, `6511157ef`), phase 1c (minimap reroute + `terrain_id``biome_id` bugfix + dict deleted, `6e26f9a4e`). **Remaining (phase 1d):** 5 proof-scene copies still carry their own `TERRAIN_COLORS` dicts (`improvement_proof`, `climate_proof`, `city_proof`, `world_map_proof`, `world_gen_lab_proof`) — test-viz only, route through `get_biome_color` to finish the DRY sweep. **Verification gap:** the minimap fix is value-preserving + a strict bugfix but its populated visual proof is pending a real `world_map` render (standalone mount can't reproduce the minimap's HUD/camera/GameMapScript context).
- [ ] **Override → inheritance** — the ~314 `add_theme_*_override` + ~27 inline `StyleBoxFlat.new()` across scenes collapse into Godot Theme type-variations so widgets inherit; `ThemeAssets.color()` remains only for genuinely dynamic/computed colours. (B cluster-3; the bulk of "used everywhere it should be.")
- [ ] **Coverage gate** — a check (script/test) asserts no raw `Color(r,g,b,...)` literals in scene scripts except sanctioned carve-outs (computed/dynamic), and no raw hex in the guide theme. Wired so regressions are caught.
- [ ] **Visual-regression proof** — per-cluster headed render proofs on plum (warm cache — safe per [[feedback_no_godot_import_on_plum]] 2026-06-18 update) confirm zero unintended colour change.