update docs for rename

develop
myk002 2022-07-29 16:08:00 -07:00
parent 7a4e8ea18e
commit eef7812bf6
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
2 changed files with 29 additions and 25 deletions

@ -1,19 +1,30 @@
rename
======
Allows renaming various things. Use `gui/rename` for an in-game interface.
Tags:
:dfhack-keybind:`rename`
Options:
Easily rename things. Use `gui/rename` for an in-game interface.
``rename squad <index> "name"``
Rename squad by index to 'name'.
``rename hotkey <index> \"name\"``
Rename hotkey by index. This allows assigning
longer commands to the DF hotkeys.
``rename unit "nickname"``
Rename a unit/creature highlighted in the DF user interface.
``rename unit-profession "custom profession"``
Change proffession name of the highlighted unit/creature.
``rename building "name"``
Set a custom name for the selected building.
The building must be one of stockpile, workshop, furnace, trap,
siege engine or an activity zone.
Usage:
``rename squad <ordinal> "<name>"``
Rename the indicated squad. The ordinal is the number that corresponds to
the list of squads in the squads menu (:kbd:`s`). The first squad is ordinal
``1``.
``rename hotkey <ordinal> "<name>"``
Rename the indicated hotkey. The ordinal the the number that corresponds to
the list of hotkeys in the hotkeys menu (:kbd:`H`). The first hotkey is
ordinal ``1``.
``rename unit "<name>"``
Give the selected unit the given nickname.
``rename unit-profession "<name>"``
Give the selected unit the given profession name.
``rename building "<name>"``
Set a custom name to the selected building. The building must be a
stockpile, workshop, furnace, trap, siege engine, or activity zone.
Example
-------
``rename squad 1 "The Whiz Bonkers"``
Rename the first squad to The Whiz Bonkers.

@ -61,16 +61,9 @@ DFhackCExport command_result plugin_init (color_ostream &out, std::vector <Plugi
{
if (world && ui) {
commands.push_back(PluginCommand(
"rename", "Rename various things.", rename, false,
" rename squad <index> \"name\"\n"
" rename hotkey <index> \"name\"\n"
" (identified by ordinal index)\n"
" rename unit \"nickname\"\n"
" rename unit-profession \"custom profession\"\n"
" (a unit must be highlighted in the ui)\n"
" rename building \"nickname\"\n"
" (a building must be highlighted via 'q')\n"
));
"rename",
"Easily rename things.",
rename));
if (Core::getInstance().isWorldLoaded())
plugin_onstatechange(out, SC_WORLD_LOADED);