Add [new] to world name when supplying a non-existent world on command line

pull/61/merge
Perttu Ahola 2012-03-13 01:45:38 +02:00
parent 71a3c2fcd1
commit 11b86f8d8a
1 changed files with 5 additions and 3 deletions

View File

@ -1308,10 +1308,12 @@ int main(int argc, char *argv[])
// If a world was commanded, append and select it // If a world was commanded, append and select it
if(commanded_world != ""){ if(commanded_world != ""){
std::string gameid = getWorldGameId(commanded_world, true); std::string gameid = getWorldGameId(commanded_world, true);
if(gameid == "") std::string name = "[--world parameter]";
if(gameid == ""){
gameid = g_settings->get("default_game"); gameid = g_settings->get("default_game");
WorldSpec spec(commanded_world, "[--world parameter]", name += " [new]";
gameid); }
WorldSpec spec(commanded_world, name, gameid);
worldspecs.push_back(spec); worldspecs.push_back(spec);
menudata.selected_world = worldspecs.size()-1; menudata.selected_world = worldspecs.size()-1;
} }