Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5ffbb4d

Browse files
committed
unify and update automelt/autotrade/autodump
1 parent c06f54d commit 5ffbb4d

19 files changed

Lines changed: 973 additions & 1702 deletions

data/init/dfhack.tools.init

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,11 @@
7878
# Display DFHack version on title screen
7979
#enable title-version
8080

81-
# Allow DFHack tools to overlay functionality and information on the DF screen
82-
enable overlay
83-
84-
# Allow buildings to be placed now and built later when materials are available
81+
# Enable system services
8582
enable buildingplan
86-
87-
#Allow designated stockpiles to automatically mark items for melting
88-
enable automelt
83+
enable confirm
84+
enable logistics
85+
enable overlay
8986

9087
# Dwarf Manipulator (simple in-game Dwarf Therapist replacement)
9188
#enable manipulator
@@ -97,28 +94,18 @@ enable automelt
9794
#enable automaterial
9895

9996
# Other interface improvement tools
100-
enable \
101-
confirm
10297
# dwarfmonitor \
10398
# mousequery \
10499
# autogems \
105-
# autodump \
106-
# automelt \
107-
# autotrade \
108-
# buildingplan \
109100
# trackstop \
110101
# zone \
111102
# stocks \
112-
# autochop \
113-
# stockpiles
103+
#
114104
#end a line with a backslash to make it continue to the next line. The \ is deleted for the final command.
115105
# Multiline commands are ONLY supported for scripts like dfhack.init. You cannot do multiline command manually on the DFHack console.
116106
# You cannot extend a commented line.
117107
# You can comment out the extension of a line.
118108

119-
# enable mouse controls and sand indicator in embark screen
120-
#embark-tools enable sticky sand mouse
121-
122109
# enable option to enter embark assistant
123110
#enable embark-assistant
124111

docs/about/Removed.rst

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,20 @@ Moved frequently used materials to the top of the materials list when building
2626
buildings. Also offered extended options when building constructions. All
2727
functionality has been merged into `buildingplan`.
2828

29+
.. _automelt:
30+
31+
automelt
32+
========
33+
Automatically mark items for melting when they are brought to a monitored
34+
stockpile. Merged into `logistics`.
35+
36+
.. _autotrade:
37+
38+
autotrade
39+
=========
40+
Automatically mark items for trading when they are brought to a monitored
41+
stockpile. Merged into `logistics`.
42+
2943
.. _autounsuspend:
3044

3145
autounsuspend
@@ -56,7 +70,7 @@ Replaced by `gui/launcher --minimal <gui/launcher>`.
5670

5771
create-items
5872
============
59-
Replaced by `gui/create-item --multi <gui/create-item>`.
73+
Replaced by `gui/create-item`.
6074

6175
.. _deteriorateclothes:
6276

@@ -172,6 +186,13 @@ Tool that warned the user when the ``dfhack.init`` file did not exist. Now that
172186
``dfhack.init`` is autogenerated in ``dfhack-config/init``, this warning is no
173187
longer necessary.
174188

189+
.. _gui/stockpiles:
190+
191+
gui/stockpiles
192+
==============
193+
Provided import/export dialogs. Converted to an `overlay` that displays when
194+
a stockpile is selected.
195+
175196
.. _masspit:
176197

177198
masspit

docs/plugins/automelt.rst

Lines changed: 0 additions & 55 deletions
This file was deleted.

docs/plugins/autotrade.rst

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/plugins/logistics.rst

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
logistics
2+
=========
3+
4+
.. dfhack-tool::
5+
:summary: Automatically mark and route items in monitored stockpiles.
6+
:tags: fort productivity items stockpiles
7+
:no-command:
8+
9+
Commands act upon the stockpile selected in the UI unless another stockpile
10+
identifier is specified on the commandline.
11+
12+
When the plugin is enabled, it checks stockpiles marked with automelt,
13+
autotrade, and/or autodump features twice every in-game day, and will mark valid
14+
items in those stockpiles for melting, trading, and/or dumping, respectively.
15+
Note that items will only be marked for trading if a caravan is approaching or
16+
is already at the trade depot.
17+
18+
Please see `gui/logistics` for the interactive status and configuration dialog.
19+
20+
Usage
21+
-----
22+
23+
::
24+
25+
enable logistics
26+
logistics [status]
27+
logistics now
28+
logistics add [melt] [trade] [dump] [<options>]
29+
logistics clear [all] [<options>]
30+
31+
Examples
32+
--------
33+
34+
``logistics``
35+
Print a summary of all your stockpiles, their ``logistics`` configuration,
36+
and the number of items that are designated (or can be designated) by each
37+
of the ``logistics`` processors.
38+
39+
``logistics now``
40+
Designate items in monitored stockpiles according to the current
41+
configuration. This works regardless of whether ``logistics`` is currently
42+
enabled.
43+
44+
``logistics add melt``
45+
Register the currently selected stockpile for automelting. Meltable items
46+
that are brought to this stockpile will be designated for melting.
47+
48+
``logistics add melt trade -s goblinite``
49+
Register the stockpile(s) named "goblinite" for automatic melting and
50+
automatic trading. Items will be marked for melting, but any items still in
51+
the stockpile when a caravan shows up will be brought to the trade depot
52+
for trading.
53+
54+
``logistics clear``
55+
Unregisters the currently selected stockpile from any monitoring. Any
56+
currently designated items will remain designated.
57+
58+
``logistics clear -s 12,15,goblinite``
59+
Unregisters the stockpiles with stockpile numbers 12 and 15, along with any
60+
stockpiles named "goblinite", from any monitoring.
61+
62+
``logistics clear all``
63+
Unregister all stockpiles from any monitoring.
64+
65+
Options
66+
-------
67+
68+
``-s``, ``--stockpile <name or number>[,<name or number>...]``
69+
Causes the command to act upon stockpiles with the given names or numbers
70+
instead of the stockpile that is currently selected in the UI. Note that
71+
the numbers are the stockpile numbers, not the building ids.

docs/plugins/stockpiles.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ stockpiles
55
:summary: Import, export, or modify stockpile settings and features.
66
:tags: fort design productivity stockpiles
77

8-
If you are importing or exporting setting and don't want to specify a building
9-
ID, select a stockpile in the UI before running the command.
8+
Commands act upon the stockpile selected in the UI unless another stockpile
9+
identifier is specified on the commandline.
1010

1111
Usage
1212
-----
@@ -15,8 +15,8 @@ Usage
1515

1616
stockpiles [status]
1717
stockpiles list [<search>]
18-
stockpiles export <name> [<options>]
1918
stockpiles import <name> [<options>]
19+
stockpiles export <name> [<options>]
2020

2121
Exported stockpile settings are saved in the ``dfhack-config/stockpiles``
2222
folder, where you can view and delete them, if desired. Names can only
@@ -61,9 +61,9 @@ Examples
6161
Options
6262
-------
6363

64-
``-s``, ``--stockpile <id>``
65-
Specify a specific stockpile ID instead of using the one currently selected
66-
in the UI.
64+
``-s``, ``--stockpile <name or id>``
65+
Specify a specific stockpile by name or internal ID instead of using the
66+
stockpile currently selected in the UI.
6767
``-i``, ``--include <comma separated list of elements to include>``
6868
When exporting, you can include this option to select only specific elements
6969
of the stockpile to record. If not specified, everything is included. When
@@ -94,6 +94,7 @@ file are:
9494
:types: The elements below the categories, which include the sub-categories, the
9595
specific item types, and any toggles the category might have (like Prepared
9696
meals for the Food category).
97+
:features: DFHack `logistics` features.
9798

9899
.. _stockpiles-library:
99100

plugins/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,8 @@ dfhack_plugin(autodump autodump.cpp)
8383
dfhack_plugin(autofarm autofarm.cpp)
8484
#dfhack_plugin(autogems autogems.cpp LINK_LIBRARIES jsoncpp_static)
8585
add_subdirectory(autolabor)
86-
dfhack_plugin(automelt automelt.cpp LINK_LIBRARIES lua)
8786
dfhack_plugin(autonestbox autonestbox.cpp LINK_LIBRARIES lua)
88-
#dfhack_plugin(autotrade autotrade.cpp)
87+
dfhack_plugin(autoslab autoslab.cpp)
8988
dfhack_plugin(blueprint blueprint.cpp LINK_LIBRARIES lua)
9089
#dfhack_plugin(burrows burrows.cpp LINK_LIBRARIES lua)
9190
#dfhack_plugin(building-hacks building-hacks.cpp LINK_LIBRARIES lua)
@@ -129,13 +128,13 @@ dfhack_plugin(hotkeys hotkeys.cpp LINK_LIBRARIES lua)
129128
dfhack_plugin(lair lair.cpp)
130129
dfhack_plugin(liquids liquids.cpp Brushes.h LINK_LIBRARIES lua)
131130
dfhack_plugin(luasocket luasocket.cpp LINK_LIBRARIES clsocket lua dfhack-tinythread)
131+
dfhack_plugin(logistics logistics.cpp LINK_LIBRARIES lua)
132132
#dfhack_plugin(manipulator manipulator.cpp)
133133
#dfhack_plugin(map-render map-render.cpp LINK_LIBRARIES lua)
134134
dfhack_plugin(misery misery.cpp LINK_LIBRARIES lua)
135135
#dfhack_plugin(mode mode.cpp)
136136
#dfhack_plugin(mousequery mousequery.cpp)
137137
dfhack_plugin(nestboxes nestboxes.cpp)
138-
dfhack_plugin(autoslab autoslab.cpp)
139138
dfhack_plugin(orders orders.cpp LINK_LIBRARIES jsoncpp_static lua)
140139
dfhack_plugin(overlay overlay.cpp LINK_LIBRARIES lua)
141140
dfhack_plugin(pathable pathable.cpp LINK_LIBRARIES lua)

0 commit comments

Comments
 (0)