Dedent unblock_cells()'s unreachable early-out #105
No reviewers
Labels
No labels
assets
bug
duplicate
enhancement
help wanted
invalid
question
testing
ui
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
liamjd/UntitledColonyBuilder!105
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "99-unblock-cells-early-out"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #99.
unblock_cells()'sif changed_cells.is_empty(): returnwas nested inside the loop and inside theis_walkable()branch, so it could never fire — the loop only runs whenchanged_cellsis non-empty. Dedented it to sit between the loop and the refresh, mirroringblock_cells().Effect: unblocking cells that were never blocked no longer runs
_refresh_connections_around([])plus a full_find_largest_region()flood fill. That path is hit bybuilding_removed, so a demolition UI calling it repeatedly gets the saving.Verification
test_terrain_navigation— 23/23 pass, includingtest_unblocking_a_cell_that_was_never_blocked_is_inert(the AC test).test_what_a_cancelled_child_should_do_to_its_parent_is_undecided, tracked as #85).No visual check needed; this is navigation-graph logic only.
🤖 Generated with Claude Code