Add [new] to world name when supplying a non-existent world on command line
authorPerttu Ahola <celeron55@gmail.com>
Mon, 12 Mar 2012 23:45:38 +0000 (01:45 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Mon, 12 Mar 2012 23:46:24 +0000 (01:46 +0200)
src/main.cpp

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