summaryrefslogtreecommitdiff
path: root/plugins/getplants.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/getplants.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/getplants.cpp')
-rw-r--r--plugins/getplants.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/plugins/getplants.cpp b/plugins/getplants.cpp
index a4b954c4..46dee0f4 100644
--- a/plugins/getplants.cpp
+++ b/plugins/getplants.cpp
@@ -34,18 +34,7 @@ DFhackCExport command_result df_getplants (Core * c, vector <string> & parameter
for (size_t i = 0; i < parameters.size(); i++)
{
if(parameters[i] == "help" || parameters[i] == "?")
- {
- c->con.print("Specify the types of trees to cut down and/or shrubs to gather by their plant IDs, separated by spaces.\n"
- "Options:\n"
- "\t-t - Select trees only (exclude shrubs)\n"
- "\t-s - Select shrubs only (exclude trees)\n"
- "\t-c - Clear designations instead of setting them\n"
- "\t-x - Apply selected action to all plants except those specified\n"
- "Specifying both -t and -s will have no effect.\n"
- "If no plant IDs are specified, all valid plant IDs will be listed.\n"
- );
return CR_WRONG_USAGE;
- }
else if(parameters[i] == "-t")
treesonly = true;
else if(parameters[i] == "-s")
@@ -152,7 +141,19 @@ DFhackCExport const char * plugin_name ( void )
DFhackCExport command_result plugin_init ( Core * c, vector <PluginCommand> &commands)
{
commands.clear();
- commands.push_back(PluginCommand("getplants", "Cut down all of the specified trees or gather all of the specified shrubs", df_getplants));
+ commands.push_back(PluginCommand(
+ "getplants", "Cut down all of the specified trees or gather specified shrubs",
+ df_getplants, false,
+ " Specify the types of trees to cut down and/or shrubs to gather by their\n"
+ " plant IDs, separated by spaces.\n"
+ "Options:\n"
+ " -t - Select trees only (exclude shrubs)\n"
+ " -s - Select shrubs only (exclude trees)\n"
+ " -c - Clear designations instead of setting them\n"
+ " -x - Apply selected action to all plants except those specified\n"
+ "Specifying both -t and -s will have no effect.\n"
+ "If no plant IDs are specified, all valid plant IDs will be listed.\n"
+ ));
return CR_OK;
}