diff --git a/changelog.txt b/changelog.txt index 389db79aa7..5525bfd3d7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -44,6 +44,7 @@ Template for new versions: - `ban-cooking`: fix banning creature alcohols resulting in error - `confirm`: properly detect clicks on the remove zone button even when the unit selection screen is also open (e.g. the vanilla assign animal to pasture panel) - `quickfort`: if a blueprint specifies an up/down stair, but the tile the blueprint is applied to cannot make an up stair (e.g. it has already been dug out), still designate a down stair if possible +- `suspendmanager`: correctly handle building collisions with smoothing designations when the building is on the edge of the map ## Misc Improvements - `gui/control-panel`: reduce frequency for `warn-stranded` check to once every 2 days diff --git a/suspendmanager.lua b/suspendmanager.lua index 9c010e2d3e..591f09ef0c 100644 --- a/suspendmanager.lua +++ b/suspendmanager.lua @@ -595,7 +595,8 @@ local function buildingOnDesignation(building) for x=building.x1,building.x2 do for y=building.y1,building.y2 do local flags, occupancy = dfhack.maps.getTileFlags(x,y,z) - if flags.dig ~= df.tile_dig_designation.No or + if not flags then goto continue end + if flags and flags.dig ~= df.tile_dig_designation.No or flags.smooth > 0 or occupancy.carve_track_north or occupancy.carve_track_east or @@ -604,6 +605,7 @@ local function buildingOnDesignation(building) then return true end + ::continue:: end end end