Skip to content

Commit d1a3038

Browse files
committed
Merge remote-tracking branch 'origin' into rename
resolved conflict in changelog.txt
2 parents 80ca072 + 4ffbea2 commit d1a3038

7 files changed

Lines changed: 420 additions & 347 deletions

File tree

changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,17 @@ Template for new versions:
2727
# Future
2828

2929
## New Tools
30+
- `machine-toggle`: interface for toggling gear assemblies, as well as pressure plates (previously in `trackstop`) (available only if ``armok`` tools are shown)
3031

3132
## New Features
3233

3334
## Fixes
3435
- `gui/rename`: fix script error that sometimes caused the script to malfunction when started from the Launcher.
36+
- `gui/control-panel`: fixed incorrect description of deteriorate commands
37+
- `gui/petitions`: fix deity display
3538

3639
## Misc Improvements
40+
- `trackstop`: ``pressureplate`` overlay moved to `machine-toggle` as an ``armok`` tool
3741

3842
## Removed
3943

docs/machine-toggle.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
machine-toggle
2+
==============
3+
4+
.. dfhack-tool::
5+
:summary: Overlay to modify pressure plates and gear assemblies after construction.
6+
:tags: fort armok buildings interface
7+
8+
This script provides 2 overlays that are managed by the `overlay` framework.
9+
The script does nothing when executed.
10+
Track stops and rollers are handled by `trackstop`.
11+
12+
The ``pressureplate`` overlay allows the player to change the trigger settings
13+
of a selected pressure plate after it has been constructed. Manual value entry
14+
of ranges for minecart and creature triggers is provided, allowing greater
15+
precision than the game interface normally permits. Incrementing or decrementing
16+
values always restricts them to the usual intervals.
17+
18+
The ``gearassembly`` overlay allows the player to toggle the state of a selected
19+
gear assembly without linking it to a lever first. This is useful for dwarfputing
20+
and other applications where it may be desirable to default to the disengaged
21+
state until triggered.

docs/trackstop.rst

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,15 @@ trackstop
22
=========
33

44
.. dfhack-tool::
5-
:summary: Overlay to allow changing track stop and related building settings after construction.
5+
:summary: Overlay to allow changing track stop and roller settings after construction.
66
:tags: fort buildings interface
77

8-
This script provides 3 overlays that are managed by the `overlay` framework.
8+
This script provides 2 overlays that are managed by the `overlay` framework.
99
The script does nothing when executed.
10+
Pressure plates and gear assemblies are handled by `machine-toggle`.
1011

1112
The ``trackstop`` overlay allows the player to change the friction and dump
1213
direction of a selected track stop after it has been constructed.
1314

1415
The ``rollers`` overlay allows the player to change the roller direction and
1516
speed of a selected roller after it has been constructed.
16-
17-
The ``pressureplate`` overlay allows the player to change the trigger settings
18-
of a selected pressure plate after it has been constructed. Manual value entry
19-
of ranges for minecart and creature triggers is provided, allowing greater
20-
precision than the game interface normally permits. Incrementing or decrementing
21-
values always restricts them to the usual intervals.

internal/control-panel/registry.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ COMMANDS_BY_IDX = {
126126
{command='deteriorate enable all', group='gameplay', mode='run',
127127
desc='Enable if you want deteriorate to run on all supported categories instead of just corpses.'},
128128
{command='deteriorate frequency 0.15 all', group='gameplay', mode='run',
129-
desc='Enable if you want to slow item deterioration down so they take about a year to rot away.'},
130-
{command='deteriorate frequency 3 all', group='gameplay', mode='run',
131129
desc='Enable if you want to speed item deterioration up so they take less than a month to rot away.'},
130+
{command='deteriorate frequency 3 all', group='gameplay', mode='run',
131+
desc='Enable if you want to slow item deterioration down so they take about a year to rot away.'},
132132
{command='dwarfvet', group='gameplay', mode='enable'},
133133
{command='eggs-fertile', help_command='tweak', group='gameplay', mode='tweak', default=true,
134134
desc='Displays an indicator on fertile eggs.'},

list-agreements.lua

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,19 @@ function get_agr_party_name(agr)
7171
return party_name
7272
end
7373

74+
---@param agr df.agreement
7475
function get_deity_name(agr)
75-
local religion_id = agr.details[0].data.Location.deity_data.Religion
76-
local deities = df.global.world.entities.all[religion_id].relations.deities
77-
if #deities == 0 then return 'An Unknown Deity' end
78-
return dfhack.translation.translateName(df.global.world.history.figures[deities[0]].name,true)
76+
local practice_type = agr.details[0].data.Location.deity_type
77+
local practice_id = agr.details[0].data.Location.deity_data.practice_id -- could be either entity_id or hf_id
78+
if practice_type == df.religious_practice_type.WORSHIP_HFID then
79+
local hf = df.historical_figure.find(practice_id)
80+
if not hf then return 'An Unknown Deity' end
81+
return dfhack.translation.translateName(hf.name, true)
82+
else
83+
local deities = df.global.world.entities.all[practice_id].relations.deities
84+
if #deities == 0 then return 'An Unknown Deity' end
85+
return dfhack.translation.translateName(df.global.world.history.figures[deities[0]].name, true)
86+
end
7987
end
8088

8189
--get resolution status, and string

0 commit comments

Comments
 (0)