Skip to content

Commit 0e1fb12

Browse files
authored
Merge branch 'DFHack:master' into combine
2 parents eaa53cf + dd60bf2 commit 0e1fb12

File tree

5 files changed

+29
-7
lines changed

5 files changed

+29
-7
lines changed

changelog.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,21 @@ Template for new versions:
3737

3838
## Removed
3939

40+
# 53.06-r1
41+
42+
## New Tools
43+
44+
## New Features
45+
46+
## Fixes
47+
- `gui/design`: designating a single-level stair construction now properly follows the selected stair type.
48+
- `gui/design`: adjusted conflicting keybinds, diagonal line reverse becoming ``R`` and bottom stair type becoming ``g``.
49+
- `modtools/set-personality`: use correct caste trait ranges; fixes `gui/gm-unit` being unable to correctly randomize traits or set traits to caste average
50+
51+
## Misc Improvements
52+
53+
## Removed
54+
4055
# 53.04-r1
4156

4257
## New Tools

docs/gui/design.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Shapes
4545
- Spacing can be increased/decreased using 'T'/'t'.
4646
- They can be inverted using 'i'.
4747
- Diagonal
48-
- Direction can be reversed using 'r'.
48+
- Direction can be reversed using 'R'.
4949
- Spacing can be increased/decreased using 'T'/'t'.
5050
- They can be inverted using 'i'.
5151
- Line

gui/design.lua

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ function Design:init()
409409
widgets.CycleHotkeyLabel {
410410
view_id='stairs_bottom_subtype',
411411
frame={t=1, l=0},
412-
key='CUSTOM_SHIFT_B',
412+
key='CUSTOM_G',
413413
label='Bottom Stair Type:',
414414
visible=function()
415415
local bounds = self:get_view_bounds()
@@ -1346,8 +1346,15 @@ function Design:get_designation(point)
13461346
if mode.desig == 'i' then
13471347
local stairs_top_type = self.subviews.stairs_top_subtype:getOptionValue()
13481348
local stairs_bottom_type = self.subviews.stairs_bottom_subtype:getOptionValue()
1349+
local stairs_only_type = self.subviews.stairs_only_subtype:getOptionValue()
13491350
if point.z == 0 then
1350-
return stairs_bottom_type == 'auto' and 'u' or stairs_bottom_type
1351+
if view_bounds.z1 == view_bounds.z2 then
1352+
-- Single layer staircase
1353+
return stairs_only_type
1354+
else
1355+
-- Bottom of multi-level staircase
1356+
return stairs_bottom_type == 'auto' and 'u' or stairs_bottom_type
1357+
end
13511358
elseif view_bounds and point.z == math.abs(view_bounds.z1 - view_bounds.z2) then
13521359
local pos = Point{x=view_bounds.x1, y=view_bounds.y1, z=view_bounds.z1} + point
13531360
local tile_type = dfhack.maps.getTileType(xyz2pos(pos.x, pos.y, pos.z))

internal/design/shapes.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ function Diag:init()
384384
name = "Reverse",
385385
type = "bool",
386386
value = false,
387-
key = "CUSTOM_R",
387+
key = "CUSTOM_SHIFT_R",
388388
},
389389
}
390390
end

modtools/set-personality.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ function getUnitCasteTraitRange(unit, trait)
168168
local caste = dfhack.units.getCasteRaw(unit)
169169
local range = {}
170170

171-
range.min = caste.personality.a[df.personality_facet_type[trait]]
172-
range.mid = caste.personality.b[df.personality_facet_type[trait]]
173-
range.max = caste.personality.c[df.personality_facet_type[trait]]
171+
range.min = caste.personality.min[df.personality_facet_type[trait]]
172+
range.mid = caste.personality.med[df.personality_facet_type[trait]]
173+
range.max = caste.personality.max[df.personality_facet_type[trait]]
174174

175175
return range
176176
end

0 commit comments

Comments
 (0)