Petr Mrázek 2011-05-07 20:24:23 +02:00
commit 384e25f260
2 changed files with 13 additions and 8 deletions

@ -166,7 +166,7 @@ int main (int argc, char** argv)
{ {
cerr << e.what() << endl; cerr << e.what() << endl;
#ifndef LINUX_BUILD #ifndef LINUX_BUILD
cin.ignore(); cin.ignore();
#endif #endif
return 1; return 1;
} }
@ -184,6 +184,11 @@ int main (int argc, char** argv)
string command = ""; string command = "";
cout <<"[" << mode << ":" << brushname << ":" << amount << ":" << flowmode << ":" << setmode << "]# "; cout <<"[" << mode << ":" << brushname << ":" << amount << ":" << flowmode << ":" << setmode << "]# ";
getline(cin, command); getline(cin, command);
if (std::cin.eof())
{
command = "q";
std::cout << std::endl; // No newline from the user here!
}
if(command=="help" || command == "?") if(command=="help" || command == "?")
{ {
cout << "Modes:" << endl cout << "Modes:" << endl
@ -492,11 +497,11 @@ int main (int argc, char** argv)
} }
DF->Detach(); DF->Detach();
#ifndef LINUX_BUILD #ifndef LINUX_BUILD
if(!quiet) if(!quiet)
{ {
cout << "Done. Press any key to continue" << endl; cout << "Done. Press any key to continue" << endl;
cin.ignore(); cin.ignore();
} }
#endif #endif
return 0; return 0;
} }

@ -278,7 +278,7 @@ int main(int argc, char *argv[])
veinMats[b->veinMaterialAt(coord)]++; veinMats[b->veinMaterialAt(coord)]++;
break; break;
case DFHack::FEATSTONE: case DFHack::FEATSTONE:
if (blockFeatureLocal) if (blockFeatureLocal && des.bits.feature_local)
{ {
if (blockFeatureLocal->type == DFHack::feature_Adamantine_Tube if (blockFeatureLocal->type == DFHack::feature_Adamantine_Tube
&& blockFeatureLocal->main_material == 0) // stone && blockFeatureLocal->main_material == 0) // stone
@ -292,7 +292,7 @@ int main(int argc, char *argv[])
} }
} }
if (showSlade && blockFeatureGlobal if (showSlade && blockFeatureGlobal && des.bits.feature_global
&& blockFeatureGlobal->type == DFHack::feature_Underworld && blockFeatureGlobal->type == DFHack::feature_Underworld
&& blockFeatureGlobal->main_material == 0) // stone && blockFeatureGlobal->main_material == 0) // stone
{ {