Skip to content

Commit 79f7e5a

Browse files
committed
fix walls being treated as potential suitable access if another wall is built beneath them
1 parent eb1ae67 commit 79f7e5a

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

docs/changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Template for new versions:
6363
- `gui/teleport`: now properly handles teleporting units that are currently falling or being flung
6464
- `unload`: fix recent regression where `unload` would immediately `reload` the target
6565
- ``Buildings`` module: do not crash if a ``map_block`` unexpectedly contains an item that is not on the master item vector
66+
- `suspendmanager`: fix walls being treated as potential suitable access if another wall is built underneath
6667

6768
## Misc Improvements
6869
- `spectate`: show dwarves' activities (like prayer)

plugins/suspendmanager.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,12 @@ class SuspendManager {
387387
if (isSuitableAccess(pos))
388388
return true;
389389

390-
// if a wall is being constructed below, the tile will be suitable
390+
// wall-type tiles can never become suitable
391+
auto tile_type = Maps::getTileType(pos);
392+
if (!tile_type || isWallTerrain(*tile_type))
393+
return false;
394+
395+
// other tiles can become suitable if a wall is being constructed below
391396
auto below = Buildings::findAtTile(coord(pos.x,pos.y,pos.z-1));
392397
if (below && below->getType() == df::building_type::Construction &&
393398
below->getSubtype() == construction_type::Wall)

0 commit comments

Comments
 (0)