9#include <unordered_map>
36 const std::string &
title =
"",
50 bool isValid()
const {
return (!
id.empty() && !
path.empty()); }
64std::string
getWorldName(
const std::string &world_path,
const std::string &default_name);
65std::string
getWorldGameId(
const std::string &world_path,
bool can_be_legacy =
false);
74 const std::string &
gameid =
"") :
Definition settings.h:109
std::string gamemods_path
Definition subgames.h:23
SubgameSpec(const std::string &id="", const std::string &path="", const std::string &gamemods_path="", const std::unordered_map< std::string, std::string > &addon_mods_paths={}, const std::string &title="", const std::string &author="", int release=0, const std::string &first_mod="", const std::string &last_mod="")
Definition subgames.h:33
std::string title
Definition subgames.h:17
std::string first_mod
Definition subgames.h:20
std::unordered_map< std::string, std::string > addon_mods_paths
Map from virtual path to mods path.
Definition subgames.h:28
void checkAndLog() const
Definition subgames.cpp:35
std::string author
Definition subgames.h:18
bool isValid() const
Definition subgames.h:50
std::string last_mod
Definition subgames.h:21
std::vector< const char * > deprecation_msgs
Definition subgames.h:31
std::string id
Definition subgames.h:16
int release
Definition subgames.h:19
std::string path
Definition subgames.h:22
bool isValid() const
Definition subgames.h:80
WorldSpec(const std::string &path="", const std::string &name="", const std::string &gameid="")
Definition subgames.h:73
std::string gameid
Definition subgames.h:71
std::string path
Definition subgames.h:69
std::string name
Definition subgames.h:70
std::vector< SubgameSpec > getAvailableGames()
Definition subgames.cpp:228
std::vector< WorldSpec > getAvailableWorlds()
Definition subgames.cpp:284
std::string getWorldGameId(const std::string &world_path, bool can_be_legacy=false)
Definition subgames.cpp:260
std::set< std::string > getAvailableGameIds()
Definition subgames.cpp:191
SubgameSpec findWorldSubgame(const std::string &world_path)
Definition subgames.cpp:181
SubgameSpec findSubgame(const std::string &id)
Definition subgames.cpp:125
std::string getWorldName(const std::string &world_path, const std::string &default_name)
Try to get the displayed name of a world.
Definition subgames.cpp:246
void loadGameConfAndInitWorld(const std::string &path, const std::string &name, const SubgameSpec &gamespec, bool create_world)
Definition subgames.cpp:332
std::vector< std::string > getEnvModPaths()
Definition subgames.cpp:412
bool getWorldExists(const std::string &world_path)
Definition subgames.cpp:238