Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Template for new versions:
## New Features

## Fixes
- `gui/design`: designating a single-level stair construction now properly follows the selected stair type.
- `gui/design`: adjusted conflicting keybinds, diagonal line reverse becoming ``R`` and bottom stair type becoming ``g``.

## Misc Improvements

Expand Down
2 changes: 1 addition & 1 deletion docs/gui/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Shapes
- Spacing can be increased/decreased using 'T'/'t'.
- They can be inverted using 'i'.
- Diagonal
- Direction can be reversed using 'r'.
- Direction can be reversed using 'R'.
- Spacing can be increased/decreased using 'T'/'t'.
- They can be inverted using 'i'.
- Line
Expand Down
11 changes: 9 additions & 2 deletions gui/design.lua
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ function Design:init()
widgets.CycleHotkeyLabel {
view_id='stairs_bottom_subtype',
frame={t=1, l=0},
key='CUSTOM_SHIFT_B',
key='CUSTOM_G',
label='Bottom Stair Type:',
visible=function()
local bounds = self:get_view_bounds()
Expand Down Expand Up @@ -1345,8 +1345,15 @@ function Design:get_designation(point)
if mode.desig == 'i' then
local stairs_top_type = self.subviews.stairs_top_subtype:getOptionValue()
local stairs_bottom_type = self.subviews.stairs_bottom_subtype:getOptionValue()
local stairs_only_type = self.subviews.stairs_only_subtype:getOptionValue()
if point.z == 0 then
return stairs_bottom_type == 'auto' and 'u' or stairs_bottom_type
if view_bounds.z1 == view_bounds.z2 then
-- Single layer staircase
return stairs_only_type
else
-- Bottom of multi-level staircase
return stairs_bottom_type == 'auto' and 'u' or stairs_bottom_type
end
elseif view_bounds and point.z == math.abs(view_bounds.z1 - view_bounds.z2) then
local pos = Point{x=view_bounds.x1, y=view_bounds.y1, z=view_bounds.z1} + point
local tile_type = dfhack.maps.getTileType(xyz2pos(pos.x, pos.y, pos.z))
Expand Down
2 changes: 1 addition & 1 deletion internal/design/shapes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ function Diag:init()
name = "Reverse",
type = "bool",
value = false,
key = "CUSTOM_R",
key = "CUSTOM_SHIFT_R",
},
}
end
Expand Down