@@ -76,12 +76,23 @@ DFHACK_PLUGIN("reveal");
7676
7777DFhackCExport command_result plugin_init ( color_ostream &out, vector <PluginCommand> &commands)
7878{
79- commands.push_back (PluginCommand (" reveal" ," Reveal the map. 'reveal hell' will also reveal hell. 'reveal demon' won't pause." ,reveal));
80- commands.push_back (PluginCommand (" unreveal" ," Revert the map to its previous state." ,unreveal));
81- commands.push_back (PluginCommand (" revtoggle" ," Reveal/unreveal depending on state." ,revtoggle));
82- commands.push_back (PluginCommand (" revflood" ," Hide all, reveal all tiles reachable from cursor position." ,revflood));
83- commands.push_back (PluginCommand (" revforget" , " Forget the current reveal data, allowing to use reveal again." ,revforget));
84- commands.push_back (PluginCommand (" nopause" ," Disable pausing (doesn't affect pause forced by reveal)." ,nopause));
79+ commands.push_back (PluginCommand (" reveal" ," Reveal the map. 'reveal hell' will also reveal hell. 'reveal demon' won't pause." ,reveal,false ,
80+ " Reveals the map, by default ignoring hell.\n "
81+ " Options:\n "
82+ " hell - also reveal hell, while forcing the game to pause.\n "
83+ " demon - reveal hell, do not pause.\n " ));
84+ commands.push_back (PluginCommand (" unreveal" ," Revert the map to its previous state." ,unreveal,false ,
85+ " Reverts the previous reveal operation, hiding the map again.\n " ));
86+ commands.push_back (PluginCommand (" revtoggle" ," Reveal/unreveal depending on state." ,revtoggle,false ,
87+ " Toggles between reveal and unreveal.\n " ));
88+ commands.push_back (PluginCommand (" revflood" ," Hide all, reveal all tiles reachable from cursor position." ,revflood,false ,
89+ " This command hides the whole map. Then, starting from the cursor,\n "
90+ " reveals all accessible tiles. Allows repairing parma-revealed maps.\n " ));
91+ commands.push_back (PluginCommand (" revforget" , " Forget the current reveal data, allowing to use reveal again." ,revforget,false ,
92+ " Forget the current reveal data, allowing to use reveal again.\n " ));
93+ commands.push_back (PluginCommand (" nopause" ," Disable pausing (doesn't affect pause forced by reveal)." ,nopause,false ,
94+ " Disable pausing (doesn't affect pause forced by reveal).\n "
95+ " Activate with 'nopause 1', deactivate with 'nopause 0'.\n " ));
8596 return CR_OK ;
8697}
8798
@@ -160,14 +171,7 @@ command_result reveal(color_ostream &out, vector<string> & params)
160171 if (params[i]==" hell" )
161172 no_hell = false ;
162173 else if (params[i] == " help" || params[i] == " ?" )
163- {
164- out.print (" Reveals the map, by default ignoring hell.\n "
165- " Options:\n "
166- " hell - also reveal hell, while forcing the game to pause.\n "
167- " demon - reveal hell, do not pause.\n "
168- );
169- return CR_OK ;
170- }
174+ return CR_WRONG_USAGE ;
171175 }
172176 if (params.size () && params[0 ] == " hell" )
173177 {
@@ -254,10 +258,7 @@ command_result unreveal(color_ostream &out, vector<string> & params)
254258 for (size_t i = 0 ; i < params.size ();i++)
255259 {
256260 if (params[i] == " help" || params[i] == " ?" )
257- {
258- out.print (" Reverts the previous reveal operation, hiding the map again.\n " );
259- return CR_OK ;
260- }
261+ return CR_WRONG_USAGE ;
261262 }
262263 if (!revealed)
263264 {
@@ -330,12 +331,7 @@ command_result revflood(color_ostream &out, vector<string> & params)
330331 for (size_t i = 0 ; i < params.size ();i++)
331332 {
332333 if (params[i] == " help" || params[i] == " ?" )
333- {
334- out.print (" This command hides the whole map. Then, starting from the cursor,\n "
335- " reveals all accessible tiles. Allows repairing parma-revealed maps.\n "
336- );
337- return CR_OK ;
338- }
334+ return CR_WRONG_USAGE ;
339335 }
340336 CoreSuspender suspend;
341337 uint32_t x_max,y_max,z_max;
@@ -482,10 +478,7 @@ command_result revforget(color_ostream &out, vector<string> & params)
482478 for (size_t i = 0 ; i < params.size ();i++)
483479 {
484480 if (params[i] == " help" || params[i] == " ?" )
485- {
486- out.print (" Forget the current reveal data, allowing to use reveal again.\n " );
487- return CR_OK ;
488- }
481+ return CR_WRONG_USAGE ;
489482 }
490483 if (!revealed)
491484 {
0 commit comments