Only allow 3dveins to be run in fortress mode

Prevents crash from running in arena mode
develop
lethosor 2014-05-13 16:41:55 -04:00
parent e4a6f13347
commit a516811bb1
1 changed files with 7 additions and 0 deletions

@ -42,6 +42,7 @@ using namespace MapExtras;
using namespace DFHack::Random;
using df::global::world;
using df::global::gametype;
command_result cmd_3dveins(color_ostream &out, std::vector <std::string> & parameters);
@ -1573,6 +1574,12 @@ command_result cmd_3dveins(color_ostream &con, std::vector<std::string> & parame
return CR_FAILURE;
}
if (*gametype != game_type::DWARF_MAIN && *gametype != game_type::DWARF_RECLAIM)
{
con.printerr("Must be used in fortress mode!\n");
return CR_FAILURE;
}
VeinGenerator generator(con);
con.print("Collecting statistics...\n");