update docs for digFlood

develop
myk002 2022-07-24 17:01:50 -07:00
parent ca06d1d9c5
commit 60b599865c
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
2 changed files with 36 additions and 33 deletions

@ -1,18 +1,38 @@
digFlood digFlood
======== ========
Automatically digs out specified veins as they are discovered. It runs once Tags:
every time a dwarf finishes a dig job. It will only dig out appropriate tiles :dfhack-keybind:`digFlood`
that are adjacent to the finished dig job. To add a vein type, use ``digFlood 1 [type]``.
This will also enable the plugin. To remove a vein type, use ``digFlood 0 [type] 1`` :index:`Digs out veins as they are discovered.
to disable, then remove, then re-enable. <digFlood; Digs out veins as they are discovered.>` It will only dig out
appropriate tiles that are adjacent to a just-finished dig job, so if you want
to autodig a vein that has already been discovered, you may need to manually
designate one tile of the tile for digging to get started.
Usage: Usage:
:help digflood: detailed help message ``enable digflood``
:digFlood 0: disable the plugin Enable the plugin.
:digFlood 1: enable the plugin ``digflood 1 <vein type> [<vein type> ...]``
:digFlood 0 MICROCLINE COAL_BITUMINOUS 1: Start monitoring for the specified vein types.
disable plugin, remove microcline and bituminous coal from monitoring, then re-enable the plugin ``digFlood 0 <vein type> [<vein type> ...] 1``
:digFlood CLEAR: remove all inorganics from monitoring Stop monitoring for the specified vein types. Note the required ``1`` at the
:digFlood digAll1: ignore the monitor list and dig any vein end.
:digFlood digAll0: disable digAll mode ``digFlood CLEAR``
Remove all inorganics from monitoring.
``digFlood digAll1``
Ignore the monitor list and dig any vein.
``digFlood digAll0``
Disable digAll mode.
You can get the list of valid vein types with this command::
lua "for i,mat in ipairs(df.global.world.raws.inorganics) do if mat.material.flags.IS_STONE and not mat.material.flags.NO_STONE_STOCKPILE then print(i, mat.id) end end"
Examples
--------
``digFlood 1 MICROCLINE COAL_BITUMINOUS``
Automatically dig microcline and bituminous coal veins.
``digFlood 0 MICROCLINE 1``
Stop automatically digging microcline.

@ -51,26 +51,9 @@ DFhackCExport command_result plugin_enable(color_ostream& out, bool enable) {
DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands) DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands)
{ {
commands.push_back(PluginCommand( commands.push_back(PluginCommand(
"digFlood", "Automatically dig out veins as you discover them.", "digFlood",
digFlood, false, "Automatically dig out veins as you discover them.",
"Example:\n" digFlood));
" digFlood 0\n"
" disable plugin\n"
" digFlood 1\n"
" enable plugin\n"
" digFlood 0 MICROCLINE COAL_BITUMINOUS 1\n"
" disable plugin and remove microcline and bituminous coal from being monitored, then re-enable plugin\n"
" digFlood 1 MICROCLINE 0 COAL_BITUMINOUS 1\n"
" do monitor microcline, don't monitor COAL_BITUMINOUS, then enable plugin\n"
" digFlood CLEAR\n"
" remove all inorganics from monitoring\n"
" digFlood digAll1\n"
" enable digAll mode: dig any vein, regardless of the monitor list\n"
" digFlood digAll0\n"
" disable digAll mode\n"
"\n"
"Note that while order matters, multiple commands can be sequenced in one line. It is recommended to alter your save-specific regionX/raw/onLoad.init or global onLoadWorld.init file so that you won't have to type in every mineral type you want to dig every time you start the game. Material names are case sensitive.\n"
));
return CR_OK; return CR_OK;
} }