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/prospector.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/prospector.cpp')
| -rw-r--r-- | plugins/prospector.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/plugins/prospector.cpp b/plugins/prospector.cpp index 861b09d3..4727460f 100644 --- a/plugins/prospector.cpp +++ b/plugins/prospector.cpp @@ -178,7 +178,16 @@ DFhackCExport const char * plugin_name ( void ) DFhackCExport command_result plugin_init ( Core * c, std::vector <PluginCommand> &commands) { commands.clear(); - commands.push_back(PluginCommand("prospect","Show stats of available raw resources. Use option 'all' to show hidden resources.",prospector)); + commands.push_back(PluginCommand( + "prospect", "Show stats of available raw resources.", + prospector, false, + " Prints a big list of all the present minerals.\n" + " By default, only the visible part of the map is scanned.\n" + "Options:\n" + " all - Scan the whole map, as if it was revealed.\n" + " value - Show material value in the output. Most useful for gems.\n" + " hell - Show the Z range of HFS tubes. Implies 'all'.\n" + )); return CR_OK; } @@ -210,18 +219,8 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par { showHidden = showTube = true; } - else if(parameters[i] == "help" || parameters[i] == "?") - { - c->con.print("Prints a big list of all the present minerals.\n" - "By default, only the visible part of the map is scanned.\n" - "\n" - "Options:\n" - "all - Scan the whole map, as if it was revealed.\n" - "value - Show material value in the output.\n" - "hell - Show the Z range of HFS tubes.\n" - ); - return CR_OK; - } + else + return CR_WRONG_USAGE; } uint32_t x_max = 0, y_max = 0, z_max = 0; CoreSuspender suspend(c); |
