From 591527d8787b6dfaafd2113bc001fe892b3eb0fb Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 13 Mar 2012 00:06:37 +0200 Subject: World creation button and dialog and functionality --- src/subgame.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/subgame.h') diff --git a/src/subgame.h b/src/subgame.h index 1daeb8b15..b201a7402 100644 --- a/src/subgame.h +++ b/src/subgame.h @@ -29,13 +29,16 @@ struct SubgameSpec std::string id; // "" = game does not exist std::string path; std::set addon_paths; + std::string name; SubgameSpec(const std::string &id_="", const std::string &path_="", - const std::set &addon_paths_=std::set()): + const std::set &addon_paths_=std::set(), + const std::string &name_=""): id(id_), path(path_), - addon_paths(addon_paths_) + addon_paths(addon_paths_), + name(name_) {} bool isValid() const @@ -47,6 +50,7 @@ struct SubgameSpec SubgameSpec findSubgame(const std::string &id); std::set getAvailableGameIds(); +std::vector getAvailableGames(); std::string getWorldGameId(const std::string &world_path, bool can_be_legacy=false); @@ -75,5 +79,8 @@ struct WorldSpec std::vector getAvailableWorlds(); +// Create world directory and world.mt if they don't exist +bool initializeWorld(const std::string &path, const std::string &gameid); + #endif -- cgit v1.2.3