diff options
| author | Petr Mrázek | 2011-08-09 01:50:22 +0200 |
|---|---|---|
| committer | Petr Mrázek | 2011-08-09 01:50:22 +0200 |
| commit | cc19180ac00c767abe164ad275fab6ab4aeb0888 (patch) | |
| tree | 9e95f92b3f4e5a5cb23409eb9a3acfd1d958acd2 /plugins/prospector.cpp | |
| parent | 8fd437dbc1caebf7a8f8b8668e2fe6a2b907f498 (diff) | |
| download | dfhack-cc19180ac00c767abe164ad275fab6ab4aeb0888.tar.gz dfhack-cc19180ac00c767abe164ad275fab6ab4aeb0888.tar.bz2 dfhack-cc19180ac00c767abe164ad275fab6ab4aeb0888.tar.xz | |
Add 'help' options to a bunch of commands.
Diffstat (limited to 'plugins/prospector.cpp')
| -rw-r--r-- | plugins/prospector.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/plugins/prospector.cpp b/plugins/prospector.cpp index 751218fc..6bfca143 100644 --- a/plugins/prospector.cpp +++ b/plugins/prospector.cpp @@ -125,7 +125,7 @@ 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 parameter 'all' to show hidden resources.",prospector)); + commands.push_back(PluginCommand("prospect","Show stats of available raw resources. Use option 'all' to show hidden resources.",prospector)); return CR_OK; } @@ -141,9 +141,22 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par bool showSlade = true; bool showTemple = true; Console & con = c->con; - if(parameters.size() && parameters[0] == "all") + for(int i = 0; i < parameters.size();i++) { - showHidden = true; + if (parameters[0] == "all") + { + showHidden = 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" + ); + return CR_OK; + } } uint32_t x_max = 0, y_max = 0, z_max = 0; c->Suspend(); |
