|
|
|
@ -76,12 +76,23 @@ DFHACK_PLUGIN("reveal");
|
|
|
|
|
|
|
|
|
|
DFhackCExport command_result plugin_init ( color_ostream &out, vector <PluginCommand> &commands)
|
|
|
|
|
{
|
|
|
|
|
commands.push_back(PluginCommand("reveal","Reveal the map. 'reveal hell' will also reveal hell. 'reveal demon' won't pause.",reveal));
|
|
|
|
|
commands.push_back(PluginCommand("unreveal","Revert the map to its previous state.",unreveal));
|
|
|
|
|
commands.push_back(PluginCommand("revtoggle","Reveal/unreveal depending on state.",revtoggle));
|
|
|
|
|
commands.push_back(PluginCommand("revflood","Hide all, reveal all tiles reachable from cursor position.",revflood));
|
|
|
|
|
commands.push_back(PluginCommand("revforget", "Forget the current reveal data, allowing to use reveal again.",revforget));
|
|
|
|
|
commands.push_back(PluginCommand("nopause","Disable pausing (doesn't affect pause forced by reveal).",nopause));
|
|
|
|
|
commands.push_back(PluginCommand("reveal","Reveal the map. 'reveal hell' will also reveal hell. 'reveal demon' won't pause.",reveal,false,
|
|
|
|
|
"Reveals the map, by default ignoring hell.\n"
|
|
|
|
|
"Options:\n"
|
|
|
|
|
"hell - also reveal hell, while forcing the game to pause.\n"
|
|
|
|
|
"demon - reveal hell, do not pause.\n"));
|
|
|
|
|
commands.push_back(PluginCommand("unreveal","Revert the map to its previous state.",unreveal,false,
|
|
|
|
|
"Reverts the previous reveal operation, hiding the map again.\n"));
|
|
|
|
|
commands.push_back(PluginCommand("revtoggle","Reveal/unreveal depending on state.",revtoggle,false,
|
|
|
|
|
"Toggles between reveal and unreveal.\n"));
|
|
|
|
|
commands.push_back(PluginCommand("revflood","Hide all, reveal all tiles reachable from cursor position.",revflood,false,
|
|
|
|
|
"This command hides the whole map. Then, starting from the cursor,\n"
|
|
|
|
|
"reveals all accessible tiles. Allows repairing parma-revealed maps.\n"));
|
|
|
|
|
commands.push_back(PluginCommand("revforget", "Forget the current reveal data, allowing to use reveal again.",revforget,false,
|
|
|
|
|
"Forget the current reveal data, allowing to use reveal again.\n"));
|
|
|
|
|
commands.push_back(PluginCommand("nopause","Disable pausing (doesn't affect pause forced by reveal).",nopause,false,
|
|
|
|
|
"Disable pausing (doesn't affect pause forced by reveal).\n"
|
|
|
|
|
"Activate with 'nopause 1', deactivate with 'nopause 0'.\n"));
|
|
|
|
|
return CR_OK;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -160,14 +171,7 @@ command_result reveal(color_ostream &out, vector<string> & params)
|
|
|
|
|
if(params[i]=="hell")
|
|
|
|
|
no_hell = false;
|
|
|
|
|
else if(params[i] == "help" || params[i] == "?")
|
|
|
|
|
{
|
|
|
|
|
out.print("Reveals the map, by default ignoring hell.\n"
|
|
|
|
|
"Options:\n"
|
|
|
|
|
"hell - also reveal hell, while forcing the game to pause.\n"
|
|
|
|
|
"demon - reveal hell, do not pause.\n"
|
|
|
|
|
);
|
|
|
|
|
return CR_OK;
|
|
|
|
|
}
|
|
|
|
|
return CR_WRONG_USAGE;
|
|
|
|
|
}
|
|
|
|
|
if(params.size() && params[0] == "hell")
|
|
|
|
|
{
|
|
|
|
@ -254,10 +258,7 @@ command_result unreveal(color_ostream &out, vector<string> & params)
|
|
|
|
|
for(size_t i = 0; i < params.size();i++)
|
|
|
|
|
{
|
|
|
|
|
if(params[i] == "help" || params[i] == "?")
|
|
|
|
|
{
|
|
|
|
|
out.print("Reverts the previous reveal operation, hiding the map again.\n");
|
|
|
|
|
return CR_OK;
|
|
|
|
|
}
|
|
|
|
|
return CR_WRONG_USAGE;
|
|
|
|
|
}
|
|
|
|
|
if(!revealed)
|
|
|
|
|
{
|
|
|
|
@ -330,12 +331,7 @@ command_result revflood(color_ostream &out, vector<string> & params)
|
|
|
|
|
for(size_t i = 0; i < params.size();i++)
|
|
|
|
|
{
|
|
|
|
|
if(params[i] == "help" || params[i] == "?")
|
|
|
|
|
{
|
|
|
|
|
out.print("This command hides the whole map. Then, starting from the cursor,\n"
|
|
|
|
|
"reveals all accessible tiles. Allows repairing parma-revealed maps.\n"
|
|
|
|
|
);
|
|
|
|
|
return CR_OK;
|
|
|
|
|
}
|
|
|
|
|
return CR_WRONG_USAGE;
|
|
|
|
|
}
|
|
|
|
|
CoreSuspender suspend;
|
|
|
|
|
uint32_t x_max,y_max,z_max;
|
|
|
|
@ -482,10 +478,7 @@ command_result revforget(color_ostream &out, vector<string> & params)
|
|
|
|
|
for(size_t i = 0; i < params.size();i++)
|
|
|
|
|
{
|
|
|
|
|
if(params[i] == "help" || params[i] == "?")
|
|
|
|
|
{
|
|
|
|
|
out.print("Forget the current reveal data, allowing to use reveal again.\n");
|
|
|
|
|
return CR_OK;
|
|
|
|
|
}
|
|
|
|
|
return CR_WRONG_USAGE;
|
|
|
|
|
}
|
|
|
|
|
if(!revealed)
|
|
|
|
|
{
|
|
|
|
|