From a52850a54b7c81613849a8da305d3a0d69d72f37 Mon Sep 17 00:00:00 2001 From: Nicholas McDaniel Date: Sat, 25 Oct 2025 23:50:06 -0400 Subject: [PATCH 1/3] Use correct stairtype for single-layer stair designations --- changelog.txt | 1 + gui/design.lua | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 1d8780ede..b0b57cc03 100644 --- a/changelog.txt +++ b/changelog.txt @@ -32,6 +32,7 @@ Template for new versions: ## New Features ## Fixes +- `gui/design`: designating a single-level stair construction now properly follows the selected stair type. ## Misc Improvements diff --git a/gui/design.lua b/gui/design.lua index 8494fe111..00fbde2c6 100644 --- a/gui/design.lua +++ b/gui/design.lua @@ -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)) From 96f53082a75a821ecd68a6ea1afe0cacedd12d0f Mon Sep 17 00:00:00 2001 From: Nicholas McDaniel Date: Sun, 26 Oct 2025 17:21:00 -0400 Subject: [PATCH 2/3] Adjust keybinds to avoid conflicts --- changelog.txt | 1 + gui/design.lua | 2 +- internal/design/shapes.lua | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index b0b57cc03..fc103db07 100644 --- a/changelog.txt +++ b/changelog.txt @@ -33,6 +33,7 @@ Template for new versions: ## 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 diff --git a/gui/design.lua b/gui/design.lua index 00fbde2c6..05d901f30 100644 --- a/gui/design.lua +++ b/gui/design.lua @@ -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() diff --git a/internal/design/shapes.lua b/internal/design/shapes.lua index 81ee41883..4f8b3f655 100644 --- a/internal/design/shapes.lua +++ b/internal/design/shapes.lua @@ -384,7 +384,7 @@ function Diag:init() name = "Reverse", type = "bool", value = false, - key = "CUSTOM_R", + key = "CUSTOM_SHIFT_R", }, } end From df224ed82d72d074366b7aa8094013c4b1be86e5 Mon Sep 17 00:00:00 2001 From: Nicholas McDaniel Date: Sun, 26 Oct 2025 18:39:49 -0400 Subject: [PATCH 3/3] Update documentation to match new keybind --- docs/gui/design.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/gui/design.rst b/docs/gui/design.rst index e858fc3d0..1c182ad26 100644 --- a/docs/gui/design.rst +++ b/docs/gui/design.rst @@ -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