Support reporting the Z range of holes in the adamantine tubes.

develop
Alexander Gavrilov 2012-01-20 20:29:51 +04:00
parent 80292bd49e
commit 3a908eb64b
1 changed files with 24 additions and 1 deletions

@ -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();
@ -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;
} }
@ -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;