summaryrefslogtreecommitdiff
path: root/plugins/colonies.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/colonies.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/colonies.cpp')
-rw-r--r--plugins/colonies.cpp27
1 files changed, 10 insertions, 17 deletions
diff --git a/plugins/colonies.cpp b/plugins/colonies.cpp
index 9ebbc8a9..7b902899 100644
--- a/plugins/colonies.cpp
+++ b/plugins/colonies.cpp
@@ -22,9 +22,14 @@ DFhackCExport const char * plugin_name ( void )
DFhackCExport command_result plugin_init ( Core * c, std::vector <PluginCommand> &commands)
{
commands.clear();
- commands.push_back(PluginCommand("colonies",
- "List or change wild colonies (ants hills and such)",
- colonies));
+ commands.push_back(PluginCommand(
+ "colonies", "List or change wild colonies (ants hills and such)",
+ colonies, false,
+ " Without any options, this command lists all the vermin colonies present.\n"
+ "Options:\n"
+ " kill - destroy colonies\n"
+ " bees - turn colonies into honey bees\n"
+ ));
return CR_OK;
}
@@ -41,7 +46,6 @@ DFhackCExport command_result colonies (Core * c, vector <string> & parameters)
{
bool destroy = false;
bool convert = false;
- bool help = false;
for(int i = 0; i < parameters.size();i++)
{
@@ -49,19 +53,8 @@ DFhackCExport command_result colonies (Core * c, vector <string> & parameters)
destroy = true;
else if(parameters[i] == "bees")
convert = true;
- else if(parameters[i] == "help" || parameters[i] == "?")
- {
- help = true;
- }
- }
- if(help)
- {
- c->con.print("Without any options, this command lists all the vermin colonies present.\n"
- "Options:\n"
- "kill - destroy colonies\n"
- "bees - turn colonies into honey bees\n"
- );
- return CR_OK;
+ else
+ return CR_WRONG_USAGE;
}
if (destroy && convert)
{