update docs for fix-unit-occupancy

develop
myk002 2022-07-25 10:23:26 -07:00
parent 2654de583f
commit 9c0bd6bd70
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
2 changed files with 36 additions and 22 deletions

@ -1,12 +1,36 @@
fix-unit-occupancy
==================
This plugin fixes issues with unit occupancy, notably phantom
"unit blocking tile" messages (:bug:`3499`). It can be run manually, or
periodically when enabled with the built-in enable/disable commands:
:(no argument): Run the plugin once immediately, for the whole map.
:-h, here, cursor: Run immediately, only operate on the tile at the cursor
:-n, dry, dry-run: Run immediately, do not write changes to map
:interval <X>: Run the plugin every ``X`` ticks (when enabled).
The default is 1200 ticks, or 1 day.
Ticks are only counted when the game is unpaused.
Tags:
:dfhack-keybind:``
Fix phantom unit occupancy issues. For example, if you see "unit blocking tile"
messages that you can't account for (:bug:`3499`), this tool can help.
Usage::
enable fix-unit-occupancy
fix-unit-occupancy [here] [-n]
fix-unit-occupancy interval <num_ticks>
When run without arguments (or with just the ``here`` or ``-n`` parameters),
the fix just runs once. You can also have it run periodically by enbling the
plugin.
Examples
--------
``fix-unit-occupancy``
Run once and fix all occupancy issues on the map.
``fix-unit-occupancy -n``
Report on, but do not fix, all occupancy issues on the map.
Options
-------
``here``
Only operate on the tile at the cursor.
``-n``
Report issues, but do not any write changes to the map.
``interval <num_ticks>``
Set how often the plugin will check for and fix issues when it is enabled.
The default is 1200 ticks, or 1 game day.

@ -181,18 +181,8 @@ DFhackCExport command_result plugin_init (color_ostream &out, std::vector <Plugi
{
commands.push_back(PluginCommand(
"fix-unit-occupancy",
"Fix unit occupancy issues such as phantom 'creature blocking site' messages (bug 3499)",
cmd_fix_unit_occupancy,
false, //allow non-interactive use
" enable fix-unit-occupancy: Enable the plugin\n"
" disable fix-unit-occupancy fix-unit-occupancy: Disable the plugin\n"
" fix-unit-occupancy: Run the plugin immediately. Available options:\n"
" -h|here|cursor: Only operate on the tile at the cursor\n"
" -n|dry|dry-run: Do not write changes to map\n"
" fix-unit-occupancy interval X: Run the plugin every X ticks (when enabled).\n"
" Default is 1200, or 1 day. Ticks are only counted when the game is unpaused.\n"
));
"Fix phantom unit occupancy issues.",
cmd_fix_unit_occupancy));
return CR_OK;
}