fix(api): 🐛 remove hardcoded culture_pool defaults in PlayerSnap

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Natalie 2026-04-17 21:01:18 -07:00
parent 5ad2ad46b7
commit d8f7882a6a

View file

@ -119,3 +119,4 @@ Test-coverage mandate response is paying off: data changes, city state transitio
2026-04-17 p2-04 LOCALIZATION GRIND (localization-grind-dev): closed the ✗ grep bullet by eliminating all 234 hardcoded UI strings across 29 .tscn files. Added 144 new vocab keys to public/games/age-of-dwarves/vocabulary.json organized by CATEGORY_SUBJECT_NAME scheme (options_*, city_screen_*, combat_preview_*, combat_result_*, promotion_picker_*, encyclopedia_*, diplomacy_panel_*, overlay_panel_*, spellbook_*, settings_*, load_game_*, demographics_col_*, end_game_stats_*, crafting_complete_*, debug_menu_*, climate_indicator_*, how_to_play_*, game_setup_*, throne_room_spoils_*, about_*, victory_menu_*, victory_replay_same_seed, arrow_prev/next). Every static label / button / header with a hardcoded `text = "..."` inspector default either (a) had its default stripped when the controller already overrode at runtime via ThemeVocabulary.lookup(), or (b) gained a `unique_name_in_owner = true` accessor + a new vocab key + a `_ready()` override line. Files touched: 29 .tscn + 17 .gd controllers + vocabulary.json. Progression: 234 → 184 (options closed, 50) → 151 (city_screen, 33) → 125 (combat trio + overlay, 40) → 92 (game_setup + how_to_play + about + victory_screen + demographics + diplomacy + settings + defeat_screen, 76) → 49 (encyclopedia + climate_indicator + crafting + debug_menu + top_bar + mana_panel + spellbook + load_game + loading + credits, 43) → 0 (throne_room pair + end_game_stats + overviews/victory + treasury, 49). Validator final: `python3 tools/validate-i18n.py` → OK: 102 scenes scanned, 0 hardcoded UI strings. All 144 new keys verified present in vocabulary.json (no typos). Objective p2-04 flipped partial → ✅ done: K=3/N=3 bullets ✓ with cited evidence. Pre-existing missing vocab keys in non-scope files (tile_info_panel, unit_panel, world_map_hud, chronicle_panel, tech_tree, treasury_tab lookups for keys like "movement_cost", "food", "gold", "attack", "treasury", "close", etc.) are scenes/gd files outside the 29-file grind list — they still render via ThemeVocabulary's title-case fallback and are not a p2-04 regression. [ref: p2-04]
2026-04-17 api-gdext TEST FIX (shipwright): removed two `culture_pool: mc_culture::CulturePool::default()` lines from `PlayerSnap` struct literals in `api-gdext/src/ai.rs:480,492` — bridge-culture-dev's p0-27 wave added `culture_pool` to `PlayerState` and updated 27 struct-literal sites but two test-fixture sites used `PlayerSnap` (the lightweight snapshot struct, not the full state) which has no `culture_pool` field. Two-line deletion. `cargo test --workspace --no-run` → Finished test profile, 0 errors. Workspace now compiles clean end-to-end for tests. [ref: p0-27]