Bug-triage patch — fix torch builds, idle-pawn traps, floor render order
Three playtest-reported bugs fixed out-of-phase before Phase 18: * Furniture build-queue gap: Torch / Bed / Crate / Workbench / CremationPyre were missing World.register_build_site(self) in _ready, so newly-painted designations never entered ConstructionProvider's iteration. The seeded cabin pre-built everything via _spawn_complete_* helpers, masking the gap until a player painted a fresh furniture designation. * Wall-trap regression for bystanders + walk-through pawns: Wall._complete now dislodges any pawn on the tile via new Pathfinder.find_nearest_walkable BFS helper; Pawn._advance_walk re-checks next tile walkability before stepping, aborts walk + cancels job + lets Decision reroute. Phase 6's adjacent-stand fix only protected the BUILDING pawn. * Floor / Pawn Y-sort ambiguity: Floor was anchored at tile-center (same Y as Pawn), so Y-sort tiebreak fell to scene-tree order and Floor (spawned later) drew over Pawn. Moved Floor origin to top-of-tile so Floor.y < Pawn.y under Y-sort; _draw rect offsets compensate. All three verified via MCP runtime: torch built end-to-end, all 3 pawns working on different jobs with no idle traps, pawn renders over floor. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d41778a483
commit
922f269a6c
9 changed files with 97 additions and 14 deletions
|
|
@ -1059,7 +1059,18 @@ func _advance_walk() -> void:
|
|||
return
|
||||
_step_progress += 1.0 / float(STEP_TICKS)
|
||||
if _step_progress >= 1.0:
|
||||
tile = _path[0]
|
||||
var next_tile: Vector2i = _path[0]
|
||||
# Guard: next tile may have become impassable mid-walk (e.g. another
|
||||
# pawn finished a wall on it). Walking onto it would strand us on a
|
||||
# non-walkable cell with no escape. Abort the walk; Decision reroutes.
|
||||
if World.pathfinder != null and not World.pathfinder.is_walkable(next_tile):
|
||||
_path.clear()
|
||||
_step_progress = 0.0
|
||||
if job_runner != null:
|
||||
job_runner.cancel_job()
|
||||
Audit.log("pawn", "%s walk aborted: %s became impassable" % [pawn_name, next_tile])
|
||||
return
|
||||
tile = next_tile
|
||||
_path.remove_at(0)
|
||||
_step_progress = 0.0
|
||||
if _path.is_empty():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue