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 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"`` Usage:
Rename squad by index to 'name'.
``rename hotkey <index> \"name\"`` ``rename squad <ordinal> "<name>"``
Rename hotkey by index. This allows assigning Rename the indicated squad. The ordinal is the number that corresponds to
longer commands to the DF hotkeys. the list of squads in the squads menu (:kbd:`s`). The first squad is ordinal
``rename unit "nickname"`` ``1``.
Rename a unit/creature highlighted in the DF user interface. ``rename hotkey <ordinal> "<name>"``
``rename unit-profession "custom profession"`` Rename the indicated hotkey. The ordinal the the number that corresponds to
Change proffession name of the highlighted unit/creature. the list of hotkeys in the hotkeys menu (:kbd:`H`). The first hotkey is
``rename building "name"`` ordinal ``1``.
Set a custom name for the selected building. ``rename unit "<name>"``
The building must be one of stockpile, workshop, furnace, trap, Give the selected unit the given nickname.
siege engine or an activity zone. ``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) { if (world && ui) {
commands.push_back(PluginCommand( commands.push_back(PluginCommand(
"rename", "Rename various things.", rename, false, "rename",
" rename squad <index> \"name\"\n" "Easily rename things.",
" rename hotkey <index> \"name\"\n" rename));
" (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"
));
if (Core::getInstance().isWorldLoaded()) if (Core::getInstance().isWorldLoaded())
plugin_onstatechange(out, SC_WORLD_LOADED); plugin_onstatechange(out, SC_WORLD_LOADED);