These Label nodes set font_color to text.primary — which is already the Label
theme default in ui_theme.tres — so the override was a no-op duplicate. Deleted
across 12 scenes; the Labels now inherit the default. Value-preserving by
construction (default == deleted value); all targets confirmed Label-typed.
gdlint: no new issues (pre-existing class-order/const-name in some files
untouched). knowledge_tree render-verified via tech_tree_proof (exit 0).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Migrate the %HappinessLabel state-conditional font_color (positive/negative/
neutral) to theme_type_variation (LabelPositive/Negative/Secondary). It's a
Label (top_bar.tscn:86), so the variation applies cleanly and is value-preserving.
This completes the static Label font_color override→inheritance migration. The
only remaining add_theme_color_override("font_color", ...) are 2 Button
state-toggles (lens_switcher active-lens, overlay_panel) — genuinely dynamic
(toggled per UI state, would need a Button-based variation), left as the
dynamic carve-out.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Node-type-aware batch: replace add_theme_color_override("font_color",
ThemeAssets.color("<token>")) with theme_type_variation on declared Label vars
only (35 overrides across 19 HUD/menu/notification/world-map scenes). Non-Label
targets (Buttons in top_bar/overlay_panel/lens_switcher) and dynamic/param
colours are left as overrides — a Label variation would break a Button's
stylebox lookup.
Value-preserving (each variation carries the identical token colour; instance
font_size overrides are untouched). All changed files gdlint-clean. Pattern is
render-proven by the statistics + hotkey_sheet iterations; live world_map render
skipped here because the working tree carries a concurrent session's uncommitted
world_map.gd / tile_info_panel edits (left unstaged).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Migrate 5 font_color overrides to theme_type_variation
(LabelTitle/Secondary/Positive/Negative/Muted). Inline StyleBoxFlat (panel bg)
left for the StyleBox sub-sweep.
Value-preserving (variations carry the same token colours) + gdlint clean. No
direct render harness (this panel opens on in-game interaction, not coverable by
a proof scene or the magic-civ open_screen surface); the variation pattern is
render-proven by the statistics + hotkey_sheet iterations.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Migrate 15 add_theme_color_override("font_color", ...) calls in statistics.gd to
theme_type_variation (LabelTitle/Secondary/Muted/Disabled/Positive/Negative).
Widgets inherit the colour from ui_theme.tres instead of hand-setting it.
Value-preserving (variations carry the same token colours). Render-verified on
plum via statistics_proof — all 5 tabs render; Rankings shows title gold, metric
secondary, trend arrows green, no regressions.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
First override→inheritance migration, proving the pattern. Replace 4
add_theme_color_override("font_color", ...) calls with theme_type_variation:
cost→LabelMuted, hint→LabelDisabled, title→LabelTitle, flavor→LabelSecondary.
Widgets now inherit the colour from ui_theme.tres instead of hand-setting it.
Value-preserving (variations carry the same token colours). Render-verified on
plum via tech_tree_proof — cost labels render the muted colour correctly, tree
unchanged. Remaining accent-param labels (_make_pill/_make_section) stay as
overrides (dynamic colour). The redundant text.primary overrides (= Label
default) are a separate delete-pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Delete the hardcoded TERRAIN_COLORS dict copies in city_proof.gd and
world_gen_lab_proof.gd; both now call DataLoader.get_biome_color(tile.biome_id)
(both load the theme, so the source is populated). Verified: city_proof renders
correct biome colours (ocean/forest/plains/mountains/volcano), no magenta.
Remaining phase-1d copies: climate_proof (also draws a colour legend off the
dict) + improvement_proof / world_map_proof (don't load_theme — would need a
theme-load added first). Tracked in p2-87.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Delete minimap.gd's divergent hardcoded TERRAIN_COLORS dict (+ DEFAULT_TERRAIN_COLOR);
terrain colour now comes from DataLoader.get_biome_color() — the same single
source (biome_colors.json) the main map renderer uses.
Also fixes a latent bug: the minimap keyed on `raw_tile.get("terrain_id")`, but
tiles only carry `biome_id` (map_loader.gd:119) — so the old terrain lookup
returned nothing and the dict's simple-name keys never matched the biome_id
namespace. Now reads biome_id, matching hex_renderer.
Value-preserving (get_biome_color returns hex_renderer's lifted values) and a
strict improvement over the broken terrain_id path. gdlint clean.
NOTE: populated-minimap visual proof deferred — a standalone mount can't
reproduce the minimap's world_map HUD context (camera/scale/GameMapScript); to
be confirmed via a real world_map render (magic-civ rendered driver).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Delete hex_renderer.gd's hardcoded 69-entry TERRAIN_COLORS dict; the terrain
sprite fallback now calls DataLoader.get_biome_color(biome_id) (the values were
lifted from this very dict in phase 1a, so value-preserving). One fewer copy of
the biome palette; file drops ~82 lines. gdlint clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Establish ONE data source for biome render colour, lifting hex_renderer.gd's
authoritative 69-entry palette (value-preserving, biome_id -> [r,g,b] 0-255).
- public/games/age-of-dwarves/data/biome_colors.json — the single source.
- DataLoader: _load_biome_colors() at theme load + get_biome_color(biome_id)
with '_default' fallback then magenta sentinel.
Additive only — no consumer rerouted yet (next phases: hex_renderer, minimap,
proof scenes all read this + delete their hardcoded TERRAIN_COLORS dicts).
Verified: headless load clean, biome_colors.json parses, 0 script errors.
(data_loader.gd max-file-lines is pre-existing, tracked by p2-10k.)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New mcp_render_driver autoload (active only on MC_MCP_RENDER=1): listens on a
localhost TCP socket polled in _process and handles screenshot / open_screen /
ping / quit against the LIVE rendered game.
TCP, not stdin: OS.read_string_from_stdin blocks an open pipe and would freeze a
rendered main loop (the player_api_main stdin pump only works --headless); a
polled TCPServer is non-blocking and also dodges Godot's windowed-stdout
buffering. Inert (set_process(false)) unless the env flag is set — zero cost in
normal play.
Verified end-to-end with NO MCP needed: MC_AUTO_START=1 MC_MCP_RENDER=1 godot +
a raw TCP client -> ping ok, screenshot -> real 3420x1923 PNG of the live world
map. Phase 2 (claude-player-mcp tools + npm install + .mcp.json + restart) next.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
main.gd: MC_AUTO_START=1 skips the menu/setup and boots an interactive seeded
game (MC_AUTOSTART_SEED / _PLAYERS / _MAP_SIZE overrides), mirroring the AI_ARENA
auto-boot but NON-spectator (local slot stays interactively controllable).
Phase-1 prerequisite for the rendered MCP driver (p2-86), and independently
fixes proof-capture: screenshots can now reach in-game screens without a human
clicking "New Game". Verified: MC_AUTO_START=1 ./run play reaches
world_map._start_game / the prologue (menu skipped), gdlint clean, 0 errors.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`GameState.get_tech_web()` no longer exists — the accessor moved to
`TurnManager.get_tech_web()` (turn_manager.gd:132, builds the graph lazily
after DataLoader loads a theme), which is what production tech_tree.gd uses.
- tech_tree_proof.gd:56 — was raising `SCRIPT ERROR: Invalid call.
Nonexistent function 'get_tech_web'` mid-setup; switched to
`TurnManager.get_tech_web() as TechWebScript`.
- end_game_stats.gd:241 — same stale call (guarded, so it silently fell to
null); switched to the live accessor.
culture_tree_proof.gd already used TurnManager.get_culture_web() — unchanged.
Verified on plum (headed render, warm cache): tech_tree_proof exits 0, ZERO
SCRIPT ERROR (was 1), diagnostics print "TechWeb: 115 techs, 10 pillars" +
all 10 domains; screenshot reviewed in conversation.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- lair_overlay_renderer now loads sprites/lairs/<type_id>.png (via
DrawHelpers.scaled_sprite_size, POI fraction 0.45) and draws it in place of
the diamond marker when the asset is present.
- Enlarge + keep-labeled the diamond fallback (radius 18→26) so a lair is at
least legible until the art lands.
- Sprite path is a no-op until the standin pipeline emits sprites/lairs/*
(tracked as a follow-up objective).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Reveal the prologue spawn box in recalculate_vision: the player owns no units
during the turn -1/0/1 cold-open, so unit-derived fog left the whole map black
and the wanderers invisible. Reveal the local player's box (LOS from centroid +
each wanderer hex) whenever a prologue is active.
- Prologue overlay: draw the real dwarf_wanderer / dwarf_tribe sprites, centered
on the hex (+ hex_center, was drawing at the corner), scaled to match in-game
units. Marker glyph kept only as a missing-asset fallback.
- Scale all unit sprites to 0.6 of hex width and city sprites to 0.75 via
DrawHelpers.scaled_sprite_size — Civ-like tile dominance instead of the tiny
native 64px blit that read as unreadable tokens.
- Add toggleable leveled Log autoload (dev/info/warn/error via MC_LOG_LEVEL,
default info); route prologue diagnostics through it with durable tags
(prologue / prologue-overlay), not objective ids.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Route the knowledge-tree (tech/culture) screen off 26 inline Color()
literals onto the design-token system.
- Add color.tech.* (8 node-state bg/border) + color.unlockAccent.* (7
badge accents + dim) to design-tokens.json using exact-hex equivalents
of the prior literals — zero visual change for cards/badges by
construction.
- Regenerate ui_theme.tres via tools/build-ui-theme.py (--check clean).
- Remap detail-panel/text literals to existing background.panel /
border.panel / border.divider / text.* / accent.* tokens.
- const→var refactor seeded in _resolve_theme_colors() (ThemeAssets.color
isn't const-eval safe), called before _build_layout().
- Compact the indicator-badge spec block to a data-driven loop (identical
tooltip output, fixes max-line-length).
Verified on plum: JSON valid, theme --check clean, all 26 token refs
resolve, no stale const refs (incl. subclasses), gdlint clean except the
pre-existing max-file-lines (file predates this pass; engine/scenes/ is
not gdlint-gated). Apricot visual proof pending (no godot import on plum).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>