Skip to content

Commit 4e8df01

Browse files
authored
Merge branch 'DFHack:master' into codex/add-dfhack-script-for-wall-smoothing
2 parents ff84515 + ff1b95a commit 4e8df01

23 files changed

+1789
-30
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020
args: ['--fix=lf']
2121
- id: trailing-whitespace
2222
- repo: https://github.com/python-jsonschema/check-jsonschema
23-
rev: 0.34.1
23+
rev: 0.36.0
2424
hooks:
2525
- id: check-github-workflows
2626
- repo: https://github.com/Lucas-C/pre-commit-hooks

changelog.txt

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,66 @@ Template for new versions:
3636

3737
## Removed
3838

39+
# 53.10-r1
40+
41+
## New Tools
42+
43+
## New Features
44+
- `gui/notify`: new notification type: missing nemesis records; displays a warning message about game corruption.
45+
46+
## Fixes
47+
48+
## Misc Improvements
49+
50+
## Removed
51+
52+
# 53.07-r1
53+
54+
## New Tools
55+
- `fix/codex-pages`: add pages to written content that have unspecified page counts.
56+
- `gui/keybinds`: gui for managing and saving custom keybindings
57+
58+
## New Features
59+
60+
## Fixes
61+
- `empty-bin`: renamed ``--liquids`` parameter to ``--force`` and made emptying of containers (bags) with powders contingent on that parameter. Previously powders would just always get disposed.
62+
63+
## Misc Improvements
64+
- `combine`: try harder to find the currently-selected stockpile
65+
66+
## Removed
67+
68+
# 53.06-r1
69+
70+
## New Tools
71+
72+
## New Features
73+
74+
## Fixes
75+
- `gui/design`: designating a single-level stair construction now properly follows the selected stair type.
76+
- `gui/design`: adjusted conflicting keybinds, diagonal line reverse becoming ``R`` and bottom stair type becoming ``g``.
77+
- `modtools/set-personality`: use correct caste trait ranges; fixes `gui/gm-unit` being unable to correctly randomize traits or set traits to caste average
78+
79+
## Misc Improvements
80+
81+
## Removed
82+
83+
# 53.04-r1
84+
85+
## New Tools
86+
- `gui/siegemanager`: manage your siege engines at a glance.
87+
88+
## New Features
89+
- `item`: new ``--total-quality`` option for use in conjunction with ``--min-quality`` or ``--max-quality`` to filter items according to their total quality
90+
91+
## Fixes
92+
93+
## Misc Improvements
94+
- `gui/design`: can now construct reinforced walls
95+
- `quickfort`: support for reinforced walls and bolt throwers
96+
97+
## Removed
98+
3999
# 53.01-r1
40100

41101
## New Tools

combine.lua

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,26 @@ local function get_stockpile_here()
736736
-- return the stockpile as a table
737737
local stockpiles = {}
738738
local building = dfhack.gui.getSelectedStockpile(true)
739+
740+
-- try finding the stockpile by viewed item or first item in itemlist viewsheet.
741+
if building == nil then
742+
local item = nil
743+
if dfhack.gui.getSelectedItem(true) ~= nil then
744+
item = dfhack.gui.getSelectedItem(true)
745+
elseif tonumber(dfhack.DF_VERSION:match("^0*%.*(%d+%.%d+)")) >= 50.07 -- matchFocusString() in Commit a770a4c
746+
and dfhack.gui.matchFocusString("dwarfmode/ViewSheets/ITEM_LIST", dfhack.gui.getDFViewscreen())
747+
and df.global.game.main_interface.view_sheets.open == true
748+
and df.global.game.main_interface.view_sheets.active_sheet == df.view_sheet_type.ITEM_LIST
749+
and #df.global.game.main_interface.view_sheets.viewing_itid > 0
750+
then
751+
local itemid = df.global.game.main_interface.view_sheets.viewing_itid[0]
752+
item = df.item.find(itemid)
753+
end
754+
local pos = (item) and xyz2pos(dfhack.items.getPosition(item)) or nil
755+
building = (pos) and dfhack.buildings.findAtTile(pos) or nil
756+
building = (df.building_stockpilest:is_instance(building)) and building or nil
757+
end
758+
739759
if not building then qerror('Please select a stockpile.') end
740760
table.insert(stockpiles, building)
741761
if opts.verbose > 0 then

docs/combine.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ Commands
3838
``all``
3939
Search all stockpiles.
4040
``here``
41-
Search the currently selected stockpile.
41+
Search the currently selected stockpile, or the stockpile that the
42+
currently-seelected item is in, or the stockpile that the currently-
43+
displayed item-list is in.
4244

4345
Options
4446
-------

docs/empty-bin.rst

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,20 @@ Examples
2525
--------
2626

2727
``empty-bin``
28-
Empty the contents of selected containers or all containers in the selected stockpile or building, except containers with liquids, onto the floor.
28+
Empty the contents of selected containers or all containers in the selected stockpile or building, except containers with liquids or powders, onto the floor.
2929

30-
``empty-bin --liquids``
31-
Empty the contents of selected containers or all containers in the selected stockpile or building, including containers with liquids, onto the floor.
30+
``empty-bin --force``
31+
Empty the contents of selected containers or all containers in the selected stockpile or building, including containers with liquids or powders, onto the floor.
32+
33+
``empty-bin --recursive --force``
34+
Empty the contents of selected containers or all containers in the selected stockpile or building, including containers with liquids/powders and containers contents that are containers, such as a bags of seeds or filled waterskins, onto the floor.
3235

33-
``empty-bin --recursive --liquids``
34-
Empty the contents of selected containers or all containers in the selected stockpile or building, including containers with liquids and containers contents that are containers, such as a bags of seeds or filled waterskins, onto the floor.
3536

3637
Options
37-
--------------
38+
-------
3839

3940
``-r``, ``--recursive``
40-
Recursively empty containers.
41-
``-l``, ``--liquids``
42-
Move contained liquids (DRINK and LIQUID_MISC) to the floor, making them unusable.
41+
Recursively empty containers.
42+
43+
``-f``, ``--force``
44+
Move contained liquid and powders (DRINK, LIQUID_MISC and POWDER_MISC) to the floor, making them unusable.

docs/fix/codex-pages.rst

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
fix/codex-pages
2+
===============
3+
4+
.. dfhack-tool::
5+
:summary: Add pages to written content that have no pages.
6+
:tags: fort bugfix items
7+
8+
Add pages to codices, quires, and scrolls that do not have specified page counts.
9+
10+
Usage
11+
-----
12+
13+
``fix/codex-pages [this|site|all]``
14+
15+
Pages will be added to written works that do not have properly specified page
16+
counts. The number of pages to be added will be determined mainly by the type
17+
of the written content, modified by its writing style and the strength of the
18+
style, with weighted randomization.
19+
20+
Options
21+
-------
22+
23+
``this``
24+
Add pages to the selected codex, quire, or scroll item.
25+
26+
``site``
27+
Add pages to all written works that are currently in the player's fortress.
28+
29+
``all``
30+
Add pages to all written works to have ever existed in the world.
31+
32+
Note
33+
----
34+
35+
This tool mitigates :bug:`9268` by generating new, randomized information for
36+
written content that do not have the start and end pages specified in their
37+
data structure. It cannot retrieve page count from written content that was
38+
already missing the page count information.
39+
40+
Also, unbound quires and scrolls do not display the number of pages they contain
41+
in their item description even if the data structure of their written content
42+
holds the information. However, once a quire that has written content with
43+
appropriately specified page count information is bound into a codex, its page
44+
count will be properly displayed in the resulting codex's item description.

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

docs/gui/keybinds.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
gui/keybinds
2+
============
3+
4+
.. dfhack-tool::
5+
:summary: Manage your dfhack keybinds visually.
6+
:tags: dfhack
7+
8+
This tool allows you to create, edit, save, and delete custom keybinds that
9+
run dfhack commands.
10+
11+
Usage
12+
-----
13+
14+
::
15+
16+
gui/keybinds
17+
18+
Focus Strings
19+
-------------
20+
21+
Keybinds may have a focus filter applied, enabling or disabling the keybind
22+
based on the current open menu or gamemode. More information on the percise
23+
format can be found in `keybinding`.
24+
25+
Saved Keybinds
26+
--------------
27+
28+
If saved, all currently active keybinds are stored in a dfhack init script at
29+
``dfhack-config/init/dfhack.auto.keybinds.init``. The save does not remove any
30+
keybinds set in other init scripts, nor created in-game.

docs/gui/siegemanager.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
gui/siegemanager
2+
================
3+
4+
.. dfhack-tool::
5+
:summary: Manage siege engines at a glance
6+
:tags: buildings interface productivity
7+
8+
This interface provides a list of siege engines, their ammo count, and current active
9+
jobs whilst providing shortcuts to configure their firing/standy mode and view them in-world.
10+
11+
Usage
12+
-----
13+
14+
::
15+
16+
gui/siegemanager

docs/item.rst

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ Examples
4949
flood-fill to create a burrow covering an entire cavern layer).
5050

5151
``item melt -t weapon -m steel --max-quality 3``
52-
Designate all steel weapons whose quality is at most superior for melting.
52+
Designate all steel weapons whose core quality is at most superior for
53+
melting.
5354

5455
``item hide -t boulder --scattered``
5556
Hide all scattered boulders, i.e. those that are not in stockpiles.
@@ -121,6 +122,11 @@ Options
121122
Only include items whose quality level is at most ``integer``. Useful
122123
values are 0 (ordinary) to 5 (masterwork).
123124

125+
``--total-quality``
126+
Only applies to ``--min-quality`` and ``--max-quality`` options. Filter items
127+
according to their total quality (to include improvements) of instead of
128+
their core quality.
129+
124130
``--stockpiled``
125131
Only include items that are in stockpiles. Does not include empty bins,
126132
barrels, and wheelbarrows assigned as storage and transport for stockpiles.
@@ -201,8 +207,12 @@ the filter is described.
201207
see above).
202208

203209
* ``condition_quality(tab, lower, upper, negate)``
204-
Selects items with quality between ``lower`` and ``upper`` (Range 0-5, see
205-
above).
210+
Selects items with core quality between ``lower`` and ``upper`` (Range 0-5,
211+
see above).
212+
213+
* ``condition_overall_quality(tab, lower, upper, negate)``
214+
Selects items with total quality between ``lower`` and ``upper`` (Range 0-5,
215+
see above).
206216

207217
* ``condition_stockpiled(tab, negate)``
208218
Corresponds to ``--stockpiled``.

0 commit comments

Comments
 (0)