|
|
|
@ -207,12 +207,7 @@ class MapCache
|
|
|
|
|
};
|
|
|
|
|
~MapCache()
|
|
|
|
|
{
|
|
|
|
|
map<DFHack::DFCoord, Block *>::iterator p;
|
|
|
|
|
for(p = blocks.begin(); p != blocks.end(); p++)
|
|
|
|
|
{
|
|
|
|
|
delete p->second;
|
|
|
|
|
//cout << stonetypes[p->first].id << " : " << p->second << endl;
|
|
|
|
|
}
|
|
|
|
|
trash();
|
|
|
|
|
}
|
|
|
|
|
bool isValid ()
|
|
|
|
|
{
|
|
|
|
@ -371,6 +366,15 @@ class MapCache
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
void trash()
|
|
|
|
|
{
|
|
|
|
|
map<DFHack::DFCoord, Block *>::iterator p;
|
|
|
|
|
for(p = blocks.begin(); p != blocks.end(); p++)
|
|
|
|
|
{
|
|
|
|
|
delete p->second;
|
|
|
|
|
}
|
|
|
|
|
blocks.clear();
|
|
|
|
|
}
|
|
|
|
|
private:
|
|
|
|
|
volatile bool valid;
|
|
|
|
|
volatile bool validgeo;
|
|
|
|
|