update docs for autodump (and related hotkeys)

develop
myk002 2022-07-18 13:28:16 -07:00
parent 3969a366ec
commit 25bc59297b
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
4 changed files with 101 additions and 37 deletions

@ -0,0 +1,10 @@
autodump-destroy-here
=====================
Destroy items marked for dumping under cursor. If called again before the game
is resumed, cancels destruction of the items. This is an alias for the
`autodump` command ``autodump destroy-here``, intended for use as a keybinding.
Usage::
autodump-destroy-here

@ -0,0 +1,13 @@
autodump-destroy-item
=====================
Destroy the selected item. The item may be selected in the :kbd:`k` list or in
the container item list. If called again before the game is resumed, cancels
destruction of the item.
This command is intended for use as a keybinding. See the `autodump` command
for other dumping/destroying options.
Usage::
autodump-destroy-item

@ -1,29 +1,82 @@
autodump autodump
======== ========
This plugin adds an option to the :kbd:`q` menu for stckpiles when `enabled <enable>`.
When autodump is enabled for a stockpile, any items placed in the stockpile will Quickly designate or teleport items to be dumped. When `enabled <enable>`, this
plugin adds an option to the :kbd:`q` menu for stockpiles. When the ``autodump``
option is selected for the stockpile, any items placed in the stockpile will
automatically be designated to be dumped. automatically be designated to be dumped.
Alternatively, you can use it to quickly move all items designated to be dumped. When invoked as a command, it can instantly move all items designated to be
Items are instantly moved to the cursor position, the dump flag is unset, dumped to the tile under the cursor. After moving the items, the dump flag is
and the forbid flag is set, as if it had been dumped normally. unset and the forbid flag is set, just as if it had been dumped normally. Be
Be aware that any active dump item tasks still point at the item. aware that dwarves that are en route to pick up the item for dumping may still
come and move the item to your dump zone.
The cursor must be placed on a floor tile so the items can be dumped there.
Usage::
Cursor must be placed on a floor tile so the items can be dumped there. enable autodump
autodump [<options>]
Options: Options:
:destroy: Destroy instead of dumping. Doesn't require a cursor. - ``destroy``
If called again before the game is resumed, cancels destroy. Destroy instead of dumping. Doesn't require a cursor. If ``autodump`` is
:destroy-here: As ``destroy``, but only the selected item in the :kbd:`k` list, called again with this option before the game is resumed, it cancels
or inside a container. the destroy action.
- ``destroy-here``
As ``destroy``, but only the selected item in the :kbd:`k` list, or inside a
container.
- ``visible``
Only process items that are not hidden.
- ``hidden``
Only process hidden items.
- ``forbidden``
Only process forbidden items (default: only unforbidden).
Examples:
- ``autodump``
Teleports all unforbidden items marked for dumping to the cursor position.
- ``autodump destroy``
Destroys all unforbidden items marked for dumping
Alias ``autodump-destroy-here``, for keybindings. Alias ``autodump-destroy-here``, for keybindings.
:dfhack-keybind:`autodump-destroy-here` :dfhack-keybind:`autodump-destroy-here`
:visible: Only process items that are not hidden.
:hidden: Only process hidden items.
:forbidden: Only process forbidden items (default: only unforbidden).
``autodump-destroy-item`` destroys the selected item, which may be selected ``autodump-destroy-item`` destroys the selected item, which may be selected
in the :kbd:`k` list, or inside a container. If called again before the game in the :kbd:`k` list, or inside a container. If called again before the game
is resumed, cancels destruction of the item. is resumed, cancels destruction of the item.
:dfhack-keybind:`autodump-destroy-item` :dfhack-keybind:`autodump-destroy-item`
commands.push_back(PluginCommand(
"autodump", "Teleport items marked for dumping to the cursor.",
df_autodump, false,
" This utility lets you quickly move all items designated to be dumped.\n"
" Items are instantly moved to the cursor position, the dump flag is unset,\n"
" and the forbid flag is set, as if it had been dumped normally.\n"
" Be aware that any active dump item tasks still point at the item.\n"
"Options:\n"
" destroy - instead of dumping, destroy the items instantly.\n"
" destroy-here - only affect the tile under cursor.\n"
" visible - only process items that are not hidden.\n"
" hidden - only process hidden items.\n"
" forbidden - only process forbidden items (default: only unforbidden).\n"
));
commands.push_back(PluginCommand(
"autodump-destroy-here", "Destroy items marked for dumping under cursor.",
df_autodump_destroy_here, Gui::cursor_hotkey,
" Identical to autodump destroy-here, but intended for use as keybinding.\n"
));
commands.push_back(PluginCommand(
"autodump-destroy-item", "Destroy the selected item.",
df_autodump_destroy_item, Gui::any_item_hotkey,
" Destroy the selected item. The item may be selected\n"
" in the 'k' list, or inside a container. If called\n"
" again before the game is resumed, cancels destroy.\n"
));
return CR_OK;

@ -275,31 +275,19 @@ command_result df_autodump_destroy_item(color_ostream &out, vector <string> & pa
DFhackCExport command_result plugin_init ( color_ostream &out, vector <PluginCommand> &commands) DFhackCExport command_result plugin_init ( color_ostream &out, vector <PluginCommand> &commands)
{ {
commands.push_back(PluginCommand( commands.push_back(PluginCommand(
"autodump", "Teleport items marked for dumping to the cursor.", "autodump",
df_autodump, false, "Teleport items marked for dumping to the cursor.",
" This utility lets you quickly move all items designated to be dumped.\n" df_autodump));
" Items are instantly moved to the cursor position, the dump flag is unset,\n"
" and the forbid flag is set, as if it had been dumped normally.\n"
" Be aware that any active dump item tasks still point at the item.\n"
"Options:\n"
" destroy - instead of dumping, destroy the items instantly.\n"
" destroy-here - only affect the tile under cursor.\n"
" visible - only process items that are not hidden.\n"
" hidden - only process hidden items.\n"
" forbidden - only process forbidden items (default: only unforbidden).\n"
));
commands.push_back(PluginCommand( commands.push_back(PluginCommand(
"autodump-destroy-here", "Destroy items marked for dumping under cursor.", "autodump-destroy-here",
df_autodump_destroy_here, Gui::cursor_hotkey, "Destroy items marked for dumping under cursor.",
" Identical to autodump destroy-here, but intended for use as keybinding.\n" df_autodump_destroy_here,
)); Gui::cursor_hotkey));
commands.push_back(PluginCommand( commands.push_back(PluginCommand(
"autodump-destroy-item", "Destroy the selected item.", "autodump-destroy-item",
df_autodump_destroy_item, Gui::any_item_hotkey, "Destroy the selected item.",
" Destroy the selected item. The item may be selected\n" df_autodump_destroy_item,
" in the 'k' list, or inside a container. If called\n" Gui::any_item_hotkey));
" again before the game is resumed, cancels destroy.\n"
));
return CR_OK; return CR_OK;
} }