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-Tag: 0.4.dev-20120318~26 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=11b86f8d8a5ce8643b0d11390b5e51b4954105c8;p=oweals%2Fminetest.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 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; }