From 388906ac70ff13c4a2b88833872b9123034f5d1a Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 20 May 2012 17:41:40 +0300 Subject: [PATCH] Allow using --worldname for local game too --- src/main.cpp | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index ec305d4b..a990032d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1037,6 +1037,31 @@ int main(int argc, char *argv[]) } } + // If a world name was specified, convert it to a path + if(commanded_worldname != ""){ + // Get information about available worlds + std::vector worldspecs = getAvailableWorlds(); + bool found = false; + for(u32 i=0; i worldspecs = getAvailableWorlds(); - world_path = ""; - for(u32 i=0; iget("name"); if(cmd_args.exists("name")) -- 2.30.2