Skip to content

Commit 9f3d27b

Browse files
authored
Merge branch 'DFHack:master' into create-item
2 parents 5a0c586 + ec7cf97 commit 9f3d27b

File tree

14 files changed

+422
-314
lines changed

14 files changed

+422
-314
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.29.1
23+
rev: 0.29.2
2424
hooks:
2525
- id: check-github-workflows
2626
- repo: https://github.com/Lucas-C/pre-commit-hooks

changelog.txt

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,30 @@ Items will now spawn correctly, and will be of the creature type and creature ca
3131
# Future
3232

3333
## New Tools
34-
- `embark-anyone`: allows you to embark as any civilisation, including dead, and non-dwarven ones
35-
- `idle-crafting`: Allow dwarfs to automatically satisfy their need to craft objects.
36-
- `gui/family-affairs`: (reinstated) inspect or meddle with pregnancies, marriages, or lover relationsips
34+
- `embark-anyone`: allows you to embark as any civilization, including dead and non-dwarven ones
35+
- `idle-crafting`: allow dwarves to independently satisfy their need to craft objects
36+
- `gui/family-affairs`: (reinstated) inspect or meddle with pregnancies, marriages, or lover relationships
3737

3838
## New Features
3939
- `caravan`: DFHack dialogs for trade screens (both ``Bring goods to depot`` and the ``Trade`` barter screen) can now filter by item origins (foreign vs. fort-made) and can filter bins by whether they have a mix of ethically acceptable and unacceptable items in them
4040
- `caravan`: If you have managed to select an item that is ethically unacceptable to the merchant, an "Ethics warning" badge will now appear next to the "Trade" button. Clicking on the badge will show you which items that you have selected are problematic. The dialog has a button that you can click to deselect the problematic items in the trade list.
4141
- `confirm`: If you have ethically unacceptable items selected for trade, the "Are you sure you want to trade" confirmation will warn you about them
42+
- `quickfort`: ``#zone`` blueprints now integrated with `preserve-rooms` so you can create a zone and automatically assign it to a noble or administrative role
43+
- `position`: option to copy cursor position to clipboard
4244

4345
## Fixes
44-
- `timestream`: ensure child growth events (e.g. becoming an adult) are not skipped over
45-
- `empty-bin`: ``--liquids`` option correctly emptying containers filled with LIQUID_MISC
46-
- `gui/design`: Update Line & Freeform tools to not overcount tiles
46+
- `timestream`: ensure child growth events (e.g. becoming an adult) are not skipped
47+
- `empty-bin`: ``--liquids`` option now correctly empties containers filled with LIQUID_MISC (like lye)
48+
- `gui/design`: don't overcount "affected tiles" for Line & Freeform drawing tools
4749

4850
## Misc Improvements
49-
- `gui/sitemap`: show whether a unit is friendly, hostile, or wildlife
51+
- `gui/sitemap`: show whether a unit is friendly, hostile, or wild
5052
- `gui/sitemap`: show whether a unit is caged
53+
- `gui/control-panel`: include option for turning off dumping of old clothes for `tailor`, for players who have magma pit dumps and want to save old clothes from being dumped into the magma
54+
- `position`: report current historical era (e.g., "Age of Myth")
55+
56+
## Documentation
57+
- `gui/embark-anywhere`: add information about how the game determines world tile pathability and instructions for bridging two landmasses
5158

5259
## Removed
5360

docs/gui/embark-anywhere.rst

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ embark in an inaccessible location on top of a mountain range? Go for it! Want
1111
to try a brief existence in the middle of the ocean? Nobody can stop you! Want
1212
to tempt fate by embarking *inside of* a necromancer tower? !!FUN!!
1313

14+
If you are using this tool to create a fort that will bridge two disconnected
15+
areas of land, see `So you want to bridge a gap?`_ below for tips and caveats.
16+
1417
Any and all consequences of embarking in strange locations are up to you to
15-
handle (possibly with other `armok <armok-tag-index>` tools).
18+
handle (possibly with other `armok <armok-tag-index>` tools). In particular,
19+
embarking in inaccessible locations will prevent migrants, caravans, and
20+
visitors from arriving.
1621

1722
Usage
1823
-----
@@ -21,9 +26,37 @@ Usage
2126

2227
gui/embark-anywhere
2328

24-
The command will only work when you are on the screen where you can choose your
25-
embark site. The DFHack logo is not displayed on that screen since its default
26-
position conflicts with the vanilla embark size selection panel. Remember that
27-
you can bring up DFHack's `context menu <hotkeys>` with
28-
:kbd:`Ctrl`:kbd:`Shift`:kbd:`C` or the
29-
`in-game command launcher <gui/launcher>` directly with the backtick key (\`).
29+
The command will only work when you are on the screen where you can choose the
30+
embark site for your fort.
31+
32+
So you want to bridge a gap?
33+
----------------------------
34+
35+
A popular use case for this tool is to create a fort (or a series of forts) that
36+
bridges two disconnected landmasses so sites on the two landmasses can reach
37+
each other (that is, they can send raiding parties and/or engage in trade).
38+
39+
However, the way this works is not entirely intuitive.
40+
41+
A single large embark is not necessarily going to functionally connect the two
42+
shores so that armies can cross the gap. You could still choose to use this
43+
approach to build a continuous constructed bridge in fort mode for later use as
44+
an *adventurer* in adventure mode, but it will not be usable by the other
45+
characters/armies in the world.
46+
47+
The DF world map is divided into blocks of 16x16 tiles. When you are choosing
48+
where to embark and you move the mouse so that your embark area "shadow" moves
49+
over a little bit -- that's one "tile". An embark area can span block
50+
boundaries, and there is no indication on the map where those boundaries are.
51+
52+
The way DF determines world pathability is to check if the ground is continuous
53+
**or** if the enclosing 16x16 block contains the upper left tile of a fort
54+
embark area.
55+
56+
In order for a connection to be formed for armies, one fort upper left corner
57+
must exist in each 16x16 block that contains part of the gap.
58+
59+
Therefore, the simplest solution for making a "bridge" that armies can use (but
60+
walking adventurers cannot) is to make a 1x1 fort every 16 tiles across the
61+
water gap, starting on land on one shore and finishing on land on the opposite
62+
shore. That will ensure that every 16x16 block in the gap is covered by a fort.

docs/gui/seedwatch.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ gui/seedwatch
55
:summary: Manages seed and plant cooking based on seed stock levels.
66
:tags: fort auto plants
77

8-
This is the configuration interface for the `seedwatch` plugin. You can configure
9-
a target stock amount for each seed type. If the number of seeds of that type falls
10-
below the target, then the plants and seeds of that type will be protected from
11-
cookery. If the number rises above the target + 20, then cooking will be allowed
12-
again.
8+
This is the configuration interface for the `seedwatch` plugin. You can
9+
configure a target stock amount for each seed type. If the number of seeds of
10+
that type falls below the target, then the plants and seeds of that type will
11+
be protected from cookery. If the number rises above the target + 20, then
12+
cooking will be allowed again.
1313

1414
Usage
1515
-----

docs/position.rst

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,30 @@ position
55
:summary: Report cursor and mouse position, along with other info.
66
:tags: fort inspection map
77

8-
This tool reports the current date, clock time, month, and season. It also
9-
reports the cursor position (or just the z-level if no cursor), window size, and
10-
mouse location on the screen.
8+
This tool reports the current date, clock time, month, season, and historical
9+
era. It also reports the keyboard cursor position (or just the z-level if no
10+
active cursor), window size, and mouse location on the screen.
11+
12+
Can also be used to copy the current keyboard cursor position for later use.
1113

1214
Usage
1315
-----
1416

1517
::
1618

17-
position
19+
position [--copy]
20+
21+
Examples
22+
--------
23+
24+
``position``
25+
Print various information.
26+
``position -c``
27+
Copy cursor position to system clipboard.
28+
29+
Options
30+
-------
31+
32+
``-c``, ``--copy``
33+
Copy current keyboard cursor position to the clipboard in format ``0,0,0``
34+
instead of reporting info. For convenience with other tools.

fix/dry-buckets.lua

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
local argparse = require("argparse")
2+
3+
local quiet = false
4+
15
local emptied = 0
26
local in_building = 0
37
local water_type = dfhack.matinfo.find('WATER').type
48

9+
argparse.processArgsGetopt({...}, {
10+
{'q', 'quiet', handler=function() quiet = true end},
11+
})
12+
513
for _,item in ipairs(df.global.world.items.other.IN_PLAY) do
614
local container = dfhack.items.getContainer(item)
715
if container
@@ -19,7 +27,9 @@ for _,item in ipairs(df.global.world.items.other.IN_PLAY) do
1927
end
2028
end
2129

22-
print('Emptied '..emptied..' buckets.')
23-
if emptied > 0 then
24-
print(('Unclogged %d wells.'):format(in_building))
30+
if not quiet then
31+
print('Emptied '..emptied..' buckets.')
32+
if emptied > 0 then
33+
print(('Unclogged %d wells.'):format(in_building))
34+
end
2535
end

gui/quickfort.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function BlueprintDialog:init()
6363
text_pen=COLOR_GREY,
6464
},
6565
widgets.ToggleHotkeyLabel{
66-
frame={t=0, l=12},
66+
frame={t=0, l=12, w=20},
6767
key='CUSTOM_ALT_L',
6868
label='Library:',
6969
options=options,
@@ -72,7 +72,7 @@ function BlueprintDialog:init()
7272
on_change=self:callback('update_setting', 'show_library')
7373
},
7474
widgets.ToggleHotkeyLabel{
75-
frame={t=0, l=35},
75+
frame={t=0, l=35, w=19},
7676
key='CUSTOM_ALT_H',
7777
label='Hidden:',
7878
options=options,

0 commit comments

Comments
 (0)