Add [new] to world name when supplying a non-existent world on command line
parent
71a3c2fcd1
commit
11b86f8d8a
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue