Skip to content

Commit

Permalink
Merge pull request #945 from myk002/myk_suspendmanager
Browse files Browse the repository at this point in the history
[suspendmanager] handle case where building footprint is invalid
  • Loading branch information
myk002 authored Jan 15, 2024
2 parents c1c5fcd + 2e553f6 commit 6cebe3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion suspendmanager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -604,6 +605,7 @@ local function buildingOnDesignation(building)
then
return true
end
::continue::
end
end
end
Expand Down

0 comments on commit 6cebe3f

Please sign in to comment.