Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[suspendmanager] handle case where building footprint is invalid #945

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -43,6 +43,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
4 changes: 3 additions & 1 deletion suspendmanager.lua
Original file line number Diff line number Diff line change
@@ -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