From: Perttu Ahola Date: Mon, 12 Mar 2012 23:45:38 +0000 (+0200) Subject: Add [new] to world name when supplying a non-existent world on command line X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=11b86f8d8a5ce8643b0d11390b5e51b4954105c8;p=zefram%2Fminetest%2Fminetest_engine.git Add [new] to world name when supplying a non-existent world on command line --- diff --git a/src/main.cpp b/src/main.cpp index e01e59a3..38a3b725 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; }