sprint A cleanup: accessibility, signals, race, debris

G: large_text scales global theme font (14→20 at 1.4×) via new
GameState.get_font_scale + EventBus.settings_changed. reduce_motion
gates ResumeToast fade (HintOverlay already gated).

I: InspectTooltip long-press wired (500ms hold, 12px drift cancel,
tap-to-clear pin). Stale Phase 19 TODO replaced with accurate doc.

H: Pawn.arrived_at_destination now also emitted on
EventBus.pawn_arrived_at_destination; DirtinessSystem subscribes and
bumps indoor traffic dirt (BUMP_INDOOR_TRAFFIC = 0.2). Outdoor-tracked
bump needs Pawn.prev_tile — flagged for Phase 20.

P: CraftingProvider caches ingredient item ref on Job.ingredient_item;
JobRunner._tick_pickup validates is_instance_valid + not being_carried
before the tile scan, cancels cleanly if another pawn grabbed it.

J: rest_provider.gd deleted. Removed @onready + register call from
world.gd, ext_resource + node from world.tscn. Provider count comment
updated to 9.

M: DIRTY_THRESHOLD extracted — cleaning_provider and job_runner now
reference DirtinessSystem.DIRT_DIRTY_THRESHOLD.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
megaproxy 2026-05-16 18:38:14 +01:00
parent 2f76ae1639
commit fd6f958344
15 changed files with 157 additions and 62 deletions

View file

@ -214,6 +214,9 @@ func _ready() -> void:
# _ready (PawnDetailPanel, WorkbenchPanel, BuildDrawer) finish first.
call_deferred("_apply_theme_to_canvas_layers")
# Accessibility — live-update the global theme font size when settings change.
EventBus.settings_changed.connect(_on_settings_changed)
## Walks the scene tree and assigns _app_theme to every Control directly under
## a CanvasLayer (the topmost Control in each layer's branch). From there the
@ -237,3 +240,16 @@ func _seed_layer_theme(layer: CanvasLayer) -> void:
func _on_layer_child_added(node: Node) -> void:
if node is Control and node.theme == null:
node.theme = _app_theme
## Accessibility: re-scale the global theme default_font_size when the player
## toggles the "Larger Text" checkbox. Mutating the shared Theme Resource
## triggers Godot's Theme.changed signal, which re-lays-out every Control that
## inherits this theme — no per-panel wiring needed for regular Labels.
## Panels with hardcoded add_theme_font_size_override calls are unaffected here;
## they handle their own overrides by listening to EventBus.settings_changed.
func _on_settings_changed() -> void:
if _app_theme == null:
return
var base_size: int = 14
_app_theme.default_font_size = int(round(float(base_size) * GameState.get_font_scale()))