Fix colonies plugin.

develop
Petr Mrázek 2011-08-04 04:18:38 +02:00
parent a8543f5ef0
commit 02d5f2273b
1 changed files with 5 additions and 5 deletions

@ -54,11 +54,10 @@ DFhackCExport command_result colonies (Core * c, vector <string> & parameters)
if (destroy && convert) if (destroy && convert)
{ {
c->con.printerr("Kill or make bees? DECIDE!\n");
c->con << "Kill or make bees? DECIDE!" << std::endl; c->Resume();
return CR_FAILURE; return CR_FAILURE;
} }
c->Suspend(); c->Suspend();
Vermin * vermin = c->getVermin(); Vermin * vermin = c->getVermin();
@ -66,9 +65,10 @@ DFhackCExport command_result colonies (Core * c, vector <string> & parameters)
SpawnPoints *points = vermin->getSpawnPoints(); SpawnPoints *points = vermin->getSpawnPoints();
if(!points->isValid()) if(!points || !points->isValid())
{ {
c->con << "vermin not supported for this DF version" << std::endl; c->con.printerr("vermin not supported for this DF version\n");
c->Resume();
return CR_FAILURE; return CR_FAILURE;
} }