Skip to content

Commit

Permalink
Merge pull request #1347 from myk002/myk_design_zone
Browse files Browse the repository at this point in the history
[gui/design] handle zone painting for dims tooltip
  • Loading branch information
myk002 authored Dec 6, 2024
2 parents 24994be + a21636e commit 0fa2f11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Template for new versions:
- `idle-crafting`: also support making shell crafts for workshops with linked input stockpiles
- `gui/gm-editor`: automatic display of semantic values for language_name fields
- `fix/stuck-worship`: reduced console output by default. Added ``--verbose`` and ``--quiet`` options.
- `gui/design`: add dimensions tooltip to vanilla zone painting interface
- `necronomicon`: new ``--world`` option to list all secret-containing items in the entire world
- `gui/design`: new ``gui/design.rightclick`` overlay that prevents right click from closing designation mode when drawing boxes and minecart tracks

Expand Down
8 changes: 5 additions & 3 deletions gui/design.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ DimensionsOverlay.ATTRS{
'dwarfmode/Designate',
'dwarfmode/Burrow/Paint',
'dwarfmode/Stockpile/Paint',
'dwarfmode/Zone/Paint',
'dwarfmode/Building/Placement',
},
}
Expand Down Expand Up @@ -101,10 +102,11 @@ function DimensionsOverlay:init()
}
end

-- don't imply that stockpiles will be 3d
-- don't imply that stockpiles or zones will be 3d
local function check_stockpile_dims()
if main_interface.bottom_mode_selected == df.main_bottom_mode_type.STOCKPILE_PAINT and
selection_rect.start_x > 0
if selection_rect.start_x > 0 and
(main_interface.bottom_mode_selected == df.main_bottom_mode_type.STOCKPILE_PAINT or
main_interface.bottom_mode_selected == df.main_bottom_mode_type.ZONE_PAINT)
then
selection_rect.start_z = df.global.window_z
end
Expand Down

0 comments on commit 0fa2f11

Please sign in to comment.