summaryrefslogtreecommitdiff
path: root/plugins/autodump.cpp
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-01-28 16:03:56 +0400
committerAlexander Gavrilov2012-01-28 16:03:56 +0400
commitfa4fb4b407b701d707ac3e3a4a0e6804cca2c526 (patch)
treeda7e5bf1119f33f7678e0a55adacd307788bb65a /plugins/autodump.cpp
parentc59f5c16421f62f88697624457b4b390306ca5a5 (diff)
downloaddfhack-fa4fb4b407b701d707ac3e3a4a0e6804cca2c526.tar.gz
dfhack-fa4fb4b407b701d707ac3e3a4a0e6804cca2c526.tar.bz2
dfhack-fa4fb4b407b701d707ac3e3a4a0e6804cca2c526.tar.xz
Modify a number of commands to use CR_WRONG_USAGE for displaying help.
Diffstat (limited to 'plugins/autodump.cpp')
-rw-r--r--plugins/autodump.cpp29
1 files changed, 13 insertions, 16 deletions
diff --git a/plugins/autodump.cpp b/plugins/autodump.cpp
index f726502c..7b9c9d2c 100644
--- a/plugins/autodump.cpp
+++ b/plugins/autodump.cpp
@@ -44,9 +44,17 @@ DFhackCExport const char * plugin_name ( void )
DFhackCExport command_result plugin_init ( Core * c, std::vector <PluginCommand> &commands)
{
commands.clear();
- commands.push_back(PluginCommand("autodump",
- "Teleport items marked for dumping to the cursor.",
- df_autodump));
+ 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"
+ ));
commands.push_back(PluginCommand(
"autodump-destroy-here", "Destroy items marked for dumping under cursor.",
df_autodump_destroy_here, cursor_hotkey,
@@ -81,19 +89,8 @@ static command_result autodump_main(Core * c, vector <string> & parameters)
destroy = true;
else if (p == "destroy-here")
destroy = here = true;
- else if(p == "?" || p == "help")
- {
- c->con.print(
- "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\n"
- "Options:\n"
- "destroy - instead of dumping, destroy the items instantly.\n"
- "destroy-here - only affect the tile under cursor.\n"
- );
- return CR_OK;
- }
+ else
+ return CR_WRONG_USAGE;
}
DFHack::VersionInfo *mem = c->vinfo;