diff options
| author | Alexander Gavrilov | 2012-01-28 16:03:56 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-01-28 16:03:56 +0400 |
| commit | fa4fb4b407b701d707ac3e3a4a0e6804cca2c526 (patch) | |
| tree | da7e5bf1119f33f7678e0a55adacd307788bb65a /plugins/mode.cpp | |
| parent | c59f5c16421f62f88697624457b4b390306ca5a5 (diff) | |
| download | dfhack-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/mode.cpp')
| -rw-r--r-- | plugins/mode.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/plugins/mode.cpp b/plugins/mode.cpp index 89728a34..e8ef7fa4 100644 --- a/plugins/mode.cpp +++ b/plugins/mode.cpp @@ -22,7 +22,13 @@ DFhackCExport const char * plugin_name ( void ) DFhackCExport command_result plugin_init ( Core * c, std::vector <PluginCommand> &commands) { commands.clear(); - commands.push_back(PluginCommand("mode","View, change and track game mode.", mode, true)); + commands.push_back(PluginCommand( + "mode","View, change and track game mode.", + mode, true, + " Without any parameters, this command prints the current game mode\n" + " You can interactively set the game mode with 'mode set'.\n" + "!!Setting the game modes can be dangerous and break your game!!\n" + )); return CR_OK; } @@ -96,17 +102,8 @@ DFhackCExport command_result mode (Core * c, vector <string> & parameters) { set = true; } - else if(parameters[0] == "?" || parameters[0] == "help") - { - c->con.print("Without any parameters, this command prints the current game mode\n" - "You can interactively set the game mode with 'mode set'.\n"); - c->con.printerr("!!Setting the game modes can be dangerous and break your game!!\n"); - return CR_OK; - } else - { - c->con.printerr("Unrecognized parameter: %s\n",parameters[0].c_str()); - } + return CR_WRONG_USAGE; } c->Suspend(); World *world = c->getWorld(); |
