From 11b86f8d8a5ce8643b0d11390b5e51b4954105c8 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 13 Mar 2012 01:45:38 +0200 Subject: [PATCH] Add [new] to world name when supplying a non-existent world on command line --- src/main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index e01e59a33..38a3b725b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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; }