summaryrefslogtreecommitdiff
path: root/plugins/prospector.cpp
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-01-20 20:29:51 +0400
committerAlexander Gavrilov2012-01-20 20:29:51 +0400
commit3a908eb64b4254b1114768284adb7b9171e5e02a (patch)
treebfa588bc52bb6a71478f44993399c5956529e93f /plugins/prospector.cpp
parent80292bd49e77e58e707b79e88993225830bfc63a (diff)
downloaddfhack-3a908eb64b4254b1114768284adb7b9171e5e02a.tar.gz
dfhack-3a908eb64b4254b1114768284adb7b9171e5e02a.tar.bz2
dfhack-3a908eb64b4254b1114768284adb7b9171e5e02a.tar.xz
Support reporting the Z range of holes in the adamantine tubes.
Diffstat (limited to 'plugins/prospector.cpp')
-rw-r--r--plugins/prospector.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/plugins/prospector.cpp b/plugins/prospector.cpp
index 334d4fff..57fb49ec 100644
--- a/plugins/prospector.cpp
+++ b/plugins/prospector.cpp
@@ -193,6 +193,7 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par
bool showSlade = true;
bool showTemple = true;
bool showValue = false;
+ bool showTube = false;
Console & con = c->con;
for(int i = 0; i < parameters.size();i++)
{
@@ -200,10 +201,14 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par
{
showHidden = true;
}
- if (parameters[i] == "value")
+ else if (parameters[i] == "value")
{
showValue = true;
}
+ else if (parameters[i] == "hell")
+ {
+ showHidden = showTube = true;
+ }
else if(parameters[i] == "help" || parameters[i] == "?")
{
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"
"all - Scan the whole map, as if it was revealed.\n"
"value - Show material value in the output.\n"
+ "hell - Show the Z range of HFS tubes.\n"
);
return CR_OK;
}
@@ -255,6 +261,7 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par
matdata liquidWater;
matdata liquidMagma;
matdata aquiferTiles;
+ matdata tubeTiles;
uint32_t vegCount = 0;
DFHack::Vegetation *veg = c->getVegetation();
@@ -342,6 +349,16 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par
case DFHack::PILLAR:
case DFHack::FORTIFICATION:
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:
continue;
}
@@ -466,6 +483,12 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par
con << std::endl;
}
+ if (showTube && tubeTiles.count)
+ {
+ con << "Has HFS tubes : ";
+ printMatdata(con, tubeTiles);
+ }
+
if (hasDemonTemple)
{
con << "Has demon temple" << std::endl;