fix: cargo standability and clear old task target
- Make is_standable return true for cargo tiles (logs, rocks can be stood on) - Clear ambulatory.target when assigning new task to prevent old targets persisting These fixes address the 'Lost Signal' bug where dorfs would freeze: 1. Cargo tiles were incorrectly flagged as non-standable, blocking pathfinding 2. Old Idle task targets persisted when new jobs assigned, causing dorfs to path to wrong locations
This commit is contained in:
@@ -301,6 +301,7 @@ pub fn job_pathfinding_system(
|
||||
*state = TaskState::Pending;
|
||||
ambulatory.current_path = None;
|
||||
ambulatory.path_index = 0;
|
||||
ambulatory.target = None; // Clear old target from previous task
|
||||
|
||||
info!(
|
||||
"[PATHFIND] SUCCESS: Assigned job {:?} to dorf {:?} with approach {:?}",
|
||||
|
||||
Reference in New Issue
Block a user