summaryrefslogtreecommitdiff
path: root/plugins/prospector.cpp
diff options
context:
space:
mode:
authorPetr Mrázek2011-11-04 09:08:29 +0100
committerPetr Mrázek2011-11-04 09:08:29 +0100
commitaf46b262b532400d1ff0ce176a969aa6d397193d (patch)
tree74380908f0eef2d84c0b53a857d4c89d34584327 /plugins/prospector.cpp
parent0ff7a48848945583f00671b1da9bbd9d16e1f33f (diff)
downloaddfhack-af46b262b532400d1ff0ce176a969aa6d397193d.tar.gz
dfhack-af46b262b532400d1ff0ce176a969aa6d397193d.tar.bz2
dfhack-af46b262b532400d1ff0ce176a969aa6d397193d.tar.xz
More init hardening.
Diffstat (limited to 'plugins/prospector.cpp')
-rw-r--r--plugins/prospector.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/prospector.cpp b/plugins/prospector.cpp
index ba20dad2..5e642ed5 100644
--- a/plugins/prospector.cpp
+++ b/plugins/prospector.cpp
@@ -198,7 +198,7 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par
DFHack::Maps *maps = c->getMaps();
if (!maps->Start())
{
- con << "Cannot get map info!" << std::endl;
+ con.printerr("Cannot get map info!\n");
c->Resume();
return CR_FAILURE;
}
@@ -208,13 +208,13 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par
DFHack::Materials *mats = c->getMaterials();
if (!mats->df_inorganic)
{
- con << "Unable to read inorganic material definitons!" << std::endl;
+ con.printerr("Unable to read inorganic material definitons!\n");
c->Resume();
return CR_FAILURE;
}
if (showPlants && !mats->df_organic)
{
- con << "Unable to read organic material definitons; plants won't be listed!" << std::endl;
+ con.printerr("Unable to read organic material definitons; plants won't be listed!\n");
showPlants = false;
}
@@ -234,21 +234,19 @@ DFhackCExport command_result prospector (DFHack::Core * c, vector <string> & par
if (!(showSlade && maps->ReadGlobalFeatures(globalFeatures)))
{
- con << "Unable to read global features; slade won't be listed!" << std::endl;
+ con.printerr("Unable to read global features; slade won't be listed!\n");
}
if (!maps->ReadLocalFeatures(localFeatures))
{
- con << "Unable to read local features; adamantine "
- << (showTemple ? "and demon temples " : "")
- << "won't be listed!" << std::endl;
+ con.printerr("Unable to read local features; adamantine and demon temples won't be listed.\n" );
}
uint32_t vegCount = 0;
DFHack::Vegetation *veg = c->getVegetation();
if (showPlants && !veg->Start())
{
- con << "Unable to read vegetation; plants won't be listed!" << std::endl;
+ con.printerr("Unable to read vegetation; plants won't be listed!\n" );
}
for(uint32_t z = 0; z < z_max; z++)