|
|
@ -50,9 +50,26 @@ DFhackCExport command_result plugin_shutdown ( color_ostream &out )
|
|
|
|
|
|
|
|
|
|
|
|
command_result catsplosion (color_ostream &out, std::vector <std::string> & parameters)
|
|
|
|
command_result catsplosion (color_ostream &out, std::vector <std::string> & parameters)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
bool list_only = false;
|
|
|
|
list<string> s_creatures;
|
|
|
|
list<string> s_creatures;
|
|
|
|
// only cats for now.
|
|
|
|
if (parameters.size())
|
|
|
|
s_creatures.push_back("CAT");
|
|
|
|
{
|
|
|
|
|
|
|
|
for (size_t i = 0; i < parameters.size(); i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (parameters[i] == "list")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
list_only = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
s_creatures.push_back(parameters[i]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
s_creatures.push_back("CAT");
|
|
|
|
|
|
|
|
}
|
|
|
|
// make the creature list unique ... with cats. they are always unique
|
|
|
|
// make the creature list unique ... with cats. they are always unique
|
|
|
|
s_creatures.unique();
|
|
|
|
s_creatures.unique();
|
|
|
|
// SUSPEND THE CORE! ::Evil laugh::
|
|
|
|
// SUSPEND THE CORE! ::Evil laugh::
|
|
|
@ -103,7 +120,10 @@ command_result catsplosion (color_ostream &out, std::vector <std::string> & para
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (list_only)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return CR_OK;
|
|
|
|
|
|
|
|
}
|
|
|
|
// process
|
|
|
|
// process
|
|
|
|
for (list<string>::iterator it = s_creatures.begin(); it != s_creatures.end(); ++it)
|
|
|
|
for (list<string>::iterator it = s_creatures.begin(); it != s_creatures.end(); ++it)
|
|
|
|
{
|
|
|
|
{
|
|
|
|