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:
parent
2f76ae1639
commit
fd6f958344
15 changed files with 157 additions and 62 deletions
|
|
@ -33,6 +33,7 @@ signal tile_beauty_changed(tile: Vector2i, beauty: float) ## Emitted when beaut
|
|||
signal tile_dirtiness_changed(tile: Vector2i, dirt: float) ## Emitted when dirtiness crosses a tier threshold (clean/dirty/filthy).
|
||||
|
||||
# Phase 14 — Death + corpses + burial.
|
||||
signal pawn_arrived_at_destination(pawn, tile: Vector2i) ## Emitted by Pawn when a walk-toil completes. DirtinessSystem uses this for traffic-dirt bumps.
|
||||
signal pawn_died(pawn, cause: StringName) ## Emitted right before Pawn is unregistered; corpse spawn handler listens here.
|
||||
signal corpse_spawned(corpse) ## Emitted when a Corpse entity is added to the world (right after pawn_died handler).
|
||||
signal corpse_buried(corpse, grave_marker) ## Emitted when a corpse reaches a GraveSlot and converts to a permanent GraveMarker.
|
||||
|
|
@ -71,6 +72,9 @@ signal help_requested ## Settings "Help" button →
|
|||
signal hint_dismissed(hint_id: StringName) ## Emitted by HintOverlay when player closes a hint; HintSystem persists the dismissal.
|
||||
signal ui_panel_opened(panel_id: StringName) ## Emitted by UI panels (build_drawer, work_matrix, ...) when they become visible. HintSystem subscribes for tour gating.
|
||||
|
||||
# Accessibility (Phase 19 completion).
|
||||
signal settings_changed ## Emitted by SettingsMenu._on_save_pressed() after GameState.apply_settings(); UI panels that honour accessibility flags re-read them here.
|
||||
|
||||
# Phase 18 — Alert wiring (dangling signals surfaced to AlertsLog).
|
||||
signal no_stockpile_accepts(item_type: StringName, tile: Vector2i) ## Emitted by HaulingProvider when an item needs haul but no stockpile accepts it (rate-limited per item_type).
|
||||
signal stockpile_layout_changed ## Emitted when any stockpile is added, removed, or has its filter/priority edited. HaulingProvider listens to reset haul_rejected items.
|
||||
|
|
|
|||
|
|
@ -60,6 +60,12 @@ func save_dict() -> Dictionary:
|
|||
}
|
||||
|
||||
|
||||
## Returns a font-scale multiplier based on the accessibility_large_text setting.
|
||||
## 1.0 = normal, 1.4 = large. Multiply any hardcoded font size by this value.
|
||||
func get_font_scale() -> float:
|
||||
return 1.4 if bool(settings.get("accessibility_large_text", false)) else 1.0
|
||||
|
||||
|
||||
func apply_dict(d: Dictionary) -> void:
|
||||
if d.has("current_map_id"):
|
||||
current_map_id = StringName(d["current_map_id"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue