From 42323014eaf359f76b388e75e788486bb0bda280 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 8 Apr 2012 23:15:50 +0300 Subject: [PATCH] Support placing a minetest game inside $world/game to allow creating proper adventure maps Pro-tip: You can open a world in minetest by opening the world.mt file using minetest. --- src/main.cpp | 43 ++++++++++++++++++++++--------------------- src/subgame.cpp | 18 ++++++++++++++++++ src/subgame.h | 3 +++ 3 files changed, 43 insertions(+), 21 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 8ec4c263..c1ed70fa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1135,43 +1135,44 @@ int main(int argc, char *argv[]) } verbosestream<<"Using world path ["<get("default_game"); - infostream<<"Using default gameid ["<get("default_game")); + infostream<<"Using default gameid ["< getAvailableGameIds() { std::set gameids; diff --git a/src/subgame.h b/src/subgame.h index 49e526d7..dd888ea0 100644 --- a/src/subgame.h +++ b/src/subgame.h @@ -47,7 +47,10 @@ struct SubgameSpec } }; +std::string getGameName(const std::string &game_path); + SubgameSpec findSubgame(const std::string &id); +SubgameSpec findWorldSubgame(const std::string &world_path); std::set getAvailableGameIds(); std::vector getAvailableGames(); -- 2.30.2