summaryrefslogtreecommitdiff
path: root/plugins/deramp.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/deramp.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/deramp.cpp')
-rw-r--r--plugins/deramp.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/plugins/deramp.cpp b/plugins/deramp.cpp
index bc3e4b7a..bb59238a 100644
--- a/plugins/deramp.cpp
+++ b/plugins/deramp.cpp
@@ -19,17 +19,8 @@ using df::global::world;
DFhackCExport command_result df_deramp (Core * c, vector <string> & parameters)
{
- for(int i = 0; i < parameters.size();i++)
- {
- if(parameters[i] == "help" || parameters[i] == "?")
- {
- c->con.print("This command does two things:\n"
- "If there are any ramps designated for removal, they will be instantly removed.\n"
- "Any ramps that don't have their counterpart will be removed (fixes bugs with caveins)\n"
- );
- return CR_OK;
- }
- }
+ if (!parameters.empty())
+ return CR_WRONG_USAGE;
CoreSuspender suspend(c);
@@ -97,9 +88,13 @@ DFhackCExport const char * plugin_name ( void )
DFhackCExport command_result plugin_init ( Core * c, std::vector <PluginCommand> &commands)
{
commands.clear();
- commands.push_back(PluginCommand("deramp",
- "De-ramp. All ramps marked for removal are replaced with floors.",
- df_deramp));
+ commands.push_back(PluginCommand(
+ "deramp", "De-ramp. All ramps marked for removal are replaced with floors.",
+ df_deramp, false,
+ " If there are any ramps designated for removal, they will be instantly\n"
+ " removed. Any ramps that don't have their counterpart will also be removed\n"
+ " (fixes bugs with caveins)\n"
+ ));
return CR_OK;
}