Re-path when a placed building cuts an in-flight path #83
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#83
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Part of milestone #4. Depends on #56 and #80. Filed now because #56's 'things that will bite' section is the only place this is written down.
A path is a snapshot
PackedVector3Array. Once #56 blocks a building's cells in the A* graph, a pawn already walking through those cells still follows its old waypoints straight through the new wall.Design:
GameState.building_placed. For each moving pawn, if any remaining waypoint's cell is inbuilding.cells(), re-path from the pawn's current cell to the original destination.find_path()for pawns actually affected.building_removed: nothing needs to happen, but note in code why (a removed building only opens routes; existing paths stay valid).AC:
TerrainGrid, aBuildingsregistry and a pawn mid-path: placing a building across the path replaces it with one that avoids the footprint; placing one that seals the route stops the pawn.Flashing red will be implemented in issue #100.