|
|
@ -193,6 +193,7 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par
|
|
|
|
bool showSlade = true;
|
|
|
|
bool showSlade = true;
|
|
|
|
bool showTemple = true;
|
|
|
|
bool showTemple = true;
|
|
|
|
bool showValue = false;
|
|
|
|
bool showValue = false;
|
|
|
|
|
|
|
|
bool showTube = false;
|
|
|
|
Console & con = c->con;
|
|
|
|
Console & con = c->con;
|
|
|
|
for(int i = 0; i < parameters.size();i++)
|
|
|
|
for(int i = 0; i < parameters.size();i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -200,10 +201,14 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par
|
|
|
|
{
|
|
|
|
{
|
|
|
|
showHidden = true;
|
|
|
|
showHidden = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (parameters[i] == "value")
|
|
|
|
else if (parameters[i] == "value")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
showValue = true;
|
|
|
|
showValue = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (parameters[i] == "hell")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
showHidden = showTube = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
else if(parameters[i] == "help" || parameters[i] == "?")
|
|
|
|
else if(parameters[i] == "help" || parameters[i] == "?")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
c->con.print("Prints a big list of all the present minerals.\n"
|
|
|
|
c->con.print("Prints a big list of all the present minerals.\n"
|
|
|
@ -212,6 +217,7 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par
|
|
|
|
"Options:\n"
|
|
|
|
"Options:\n"
|
|
|
|
"all - Scan the whole map, as if it was revealed.\n"
|
|
|
|
"all - Scan the whole map, as if it was revealed.\n"
|
|
|
|
"value - Show material value in the output.\n"
|
|
|
|
"value - Show material value in the output.\n"
|
|
|
|
|
|
|
|
"hell - Show the Z range of HFS tubes.\n"
|
|
|
|
);
|
|
|
|
);
|
|
|
|
return CR_OK;
|
|
|
|
return CR_OK;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -255,6 +261,7 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par
|
|
|
|
matdata liquidWater;
|
|
|
|
matdata liquidWater;
|
|
|
|
matdata liquidMagma;
|
|
|
|
matdata liquidMagma;
|
|
|
|
matdata aquiferTiles;
|
|
|
|
matdata aquiferTiles;
|
|
|
|
|
|
|
|
matdata tubeTiles;
|
|
|
|
|
|
|
|
|
|
|
|
uint32_t vegCount = 0;
|
|
|
|
uint32_t vegCount = 0;
|
|
|
|
DFHack::Vegetation *veg = c->getVegetation();
|
|
|
|
DFHack::Vegetation *veg = c->getVegetation();
|
|
|
@ -270,7 +277,7 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par
|
|
|
|
for(uint32_t b_x = 0; b_x < x_max; b_x++)
|
|
|
|
for(uint32_t b_x = 0; b_x < x_max; b_x++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Get the map block
|
|
|
|
// Get the map block
|
|
|
|
DFHack::DFCoord blockCoord(b_x, b_y);
|
|
|
|
df::coord2d blockCoord(b_x, b_y);
|
|
|
|
MapExtras::Block *b = map.BlockAt(DFHack::DFCoord(b_x, b_y, z));
|
|
|
|
MapExtras::Block *b = map.BlockAt(DFHack::DFCoord(b_x, b_y, z));
|
|
|
|
if (!b || !b->valid)
|
|
|
|
if (!b || !b->valid)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -294,7 +301,7 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par
|
|
|
|
{
|
|
|
|
{
|
|
|
|
for(uint32_t x = 0; x < 16; x++)
|
|
|
|
for(uint32_t x = 0; x < 16; x++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DFHack::DFCoord coord(x, y);
|
|
|
|
df::coord2d coord(x, y);
|
|
|
|
df::tile_designation des = b->DesignationAt(coord);
|
|
|
|
df::tile_designation des = b->DesignationAt(coord);
|
|
|
|
df::tile_occupancy occ = b->OccupancyAt(coord);
|
|
|
|
df::tile_occupancy occ = b->OccupancyAt(coord);
|
|
|
|
|
|
|
|
|
|
|
@ -342,6 +349,16 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par
|
|
|
|
case DFHack::PILLAR:
|
|
|
|
case DFHack::PILLAR:
|
|
|
|
case DFHack::FORTIFICATION:
|
|
|
|
case DFHack::FORTIFICATION:
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DFHack::EMPTY:
|
|
|
|
|
|
|
|
/* A heuristic: tubes inside adamantine have EMPTY:AIR tiles which
|
|
|
|
|
|
|
|
still have feature_local set. Also check the unrevealed status,
|
|
|
|
|
|
|
|
so as to exclude any holes mined by the player. */
|
|
|
|
|
|
|
|
if (info->material == DFHack::AIR &&
|
|
|
|
|
|
|
|
des.bits.feature_local && des.bits.hidden &&
|
|
|
|
|
|
|
|
blockFeatureLocal.type == df::feature_type::deep_special_tube)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
tubeTiles.add(global_z);
|
|
|
|
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -398,7 +415,7 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par
|
|
|
|
for (PlantList::const_iterator it = plants->begin(); it != plants->end(); it++)
|
|
|
|
for (PlantList::const_iterator it = plants->begin(); it != plants->end(); it++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const DFHack::df_plant & plant = *(*it);
|
|
|
|
const DFHack::df_plant & plant = *(*it);
|
|
|
|
DFHack::DFCoord loc(plant.x, plant.y);
|
|
|
|
df::coord2d loc(plant.x, plant.y);
|
|
|
|
loc = loc % 16;
|
|
|
|
loc = loc % 16;
|
|
|
|
if (showHidden || !b->DesignationAt(loc).bits.hidden)
|
|
|
|
if (showHidden || !b->DesignationAt(loc).bits.hidden)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -466,6 +483,12 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par
|
|
|
|
con << std::endl;
|
|
|
|
con << std::endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (showTube && tubeTiles.count)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
con << "Has HFS tubes : ";
|
|
|
|
|
|
|
|
printMatdata(con, tubeTiles);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (hasDemonTemple)
|
|
|
|
if (hasDemonTemple)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
con << "Has demon temple" << std::endl;
|
|
|
|
con << "Has demon temple" << std::endl;
|
|
|
|