Skip to content

Commit e867251

Browse files
committed
suspendmanager: don't leave one tile unsuspended with closed down dead-ends
1 parent 715cf02 commit e867251

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

docs/changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Template for new versions:
6464
- `dig`: don't affect already-revealed tiles when marking z-level for warm/damp dig
6565
- `zone`: refresh values in distance column when switching selected pastures when the assign animals dialog is open
6666
- `logistics`: also add trainers to semi-wild pets when autoretrain is enabled
67+
- `suspendmanager`: fully suspend unbuildable deadends
6768

6869
## Misc Improvements
6970
- `caravan`: display who is in the cages you are selecting for trade and whether they are hostile

plugins/suspendmanager.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,13 @@ class SuspendManager {
556556
exit = impassiblePlan;
557557
}
558558

559-
if (!exit) return;
559+
if (!exit) {
560+
// there is no exit at all
561+
// suspend the current construction job to leave the entire plan suspended
562+
// and stop here
563+
suspensions[job->id] = Reason::DEADEND;
564+
return;
565+
}
560566

561567
// exit is the single exit point of this corridor, suspend its construction job...
562568
for (auto exit_job : exit->jobs) {

0 commit comments

Comments
 (0)