take carved stairs into account when auto building stairs

develop
Myk Taylor 2023-03-24 15:43:02 -07:00
parent 58eaf33b08
commit a8822bdefa
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
2 changed files with 3 additions and 2 deletions

@ -38,6 +38,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
## Fixes
- `buildingplan`: filters are now properly applied to planned stairs
- `buildingplan`: existing carved up/down stairs are now taken into account when determining which stair shape to construct
- `buildingplan`: upright spike traps are now placed extended rather than retracted
- `buildingplan`: fixed material filter getting lost for planning buildings on save/reload
- `buildingplan`: respect building size limits (e.g. roads and bridges cannot be more than 31 tiles in any dimension)

@ -782,7 +782,7 @@ function PlannerOverlay:get_stairs_subtype(pos, bounds)
if opt == 'auto' then
local tt = dfhack.maps.getTileType(pos)
local shape = df.tiletype.attrs[tt].shape
if shape ~= df.tiletype_shape.STAIR_DOWN then
if shape ~= df.tiletype_shape.STAIR_DOWN and shape ~= df.tiletype_shape.STAIR_UPDOWN then
subtype = df.construction_type.UpStair
end
else
@ -793,7 +793,7 @@ function PlannerOverlay:get_stairs_subtype(pos, bounds)
if opt == 'auto' then
local tt = dfhack.maps.getTileType(pos)
local shape = df.tiletype.attrs[tt].shape
if shape ~= df.tiletype_shape.STAIR_UP then
if shape ~= df.tiletype_shape.STAIR_UP and shape ~= df.tiletype_shape.STAIR_UPDOWN then
subtype = df.construction_type.DownStair
end
else