summaryrefslogtreecommitdiff
path: root/plugins/weather.cpp
diff options
context:
space:
mode:
authorPetr Mrázek2011-08-09 01:50:22 +0200
committerPetr Mrázek2011-08-09 01:50:22 +0200
commitcc19180ac00c767abe164ad275fab6ab4aeb0888 (patch)
tree9e95f92b3f4e5a5cb23409eb9a3acfd1d958acd2 /plugins/weather.cpp
parent8fd437dbc1caebf7a8f8b8668e2fe6a2b907f498 (diff)
downloaddfhack-cc19180ac00c767abe164ad275fab6ab4aeb0888.tar.gz
dfhack-cc19180ac00c767abe164ad275fab6ab4aeb0888.tar.bz2
dfhack-cc19180ac00c767abe164ad275fab6ab4aeb0888.tar.xz
Add 'help' options to a bunch of commands.
Diffstat (limited to 'plugins/weather.cpp')
-rw-r--r--plugins/weather.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/weather.cpp b/plugins/weather.cpp
index bc3c39b3..76757b25 100644
--- a/plugins/weather.cpp
+++ b/plugins/weather.cpp
@@ -25,8 +25,7 @@ DFhackCExport command_result plugin_init ( Core * c, std::vector <PluginCommand>
commands.clear();
commands.push_back(PluginCommand("weather",
"Print the weather map or change weather.\
-\n Options: 'lock'/'unlock' = disallow game from changing weather\
-\n 'snow' = make it snow, 'rain' = make it rain.\
+\n Options: 'snow' = make it snow, 'rain' = make it rain.\
\n 'clear' = clear the sky",weather));
return CR_OK;
}
@@ -44,6 +43,7 @@ DFhackCExport command_result weather (Core * c, vector <string> & parameters)
bool snow = false;
bool rain = false;
bool clear = false;
+ bool help = false;
for(int i = 0; i < parameters.size();i++)
{
if(parameters[i] == "rain")
@@ -56,6 +56,12 @@ DFhackCExport command_result weather (Core * c, vector <string> & parameters)
lock = true;
else if(parameters[i] == "unlock")
unlock = true;
+ else if(parameters[i] == "help" || parameters[i] == "?")
+ help = true;
+ }
+ if(help)
+ {
+
}
if(lock && unlock)
{