Luanti 5.16.0-dev
Loading...
Searching...
No Matches
SubgameSpec Struct Reference

#include <subgames.h>

Collaboration diagram for SubgameSpec:

Public Member Functions

 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="", const std::unordered_set< std::string > &aliases={})
bool isValid () const
void checkAndLog () const

Public Attributes

std::string id
std::string title
std::string author
int release
std::string first_mod
std::string last_mod
std::string path
std::string gamemods_path
std::unordered_map< std::string, std::string > addon_mods_paths
 Map from virtual path to mods path.
std::unordered_set< std::string > aliases
 All worlds are marked with a specific gameid.
std::vector< const char * > deprecation_msgs

Constructor & Destructor Documentation

◆ SubgameSpec()

SubgameSpec::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 = "",
const std::unordered_set< std::string > & aliases = {} )
inline

References addon_mods_paths, gamemods_path, and path.

Member Function Documentation

◆ checkAndLog()

void SubgameSpec::checkAndLog ( ) const

References deprecation_msgs, Error, get_deprecated_handling_mode(), Ignore, path, title, and warningstream.

Here is the call graph for this function:

◆ isValid()

bool SubgameSpec::isValid ( ) const
inline

References path.

Referenced by Server::Server(), determine_subgame(), get_game_from_cmdline(), and ClientLauncher::launch_game().

Here is the caller graph for this function:

Member Data Documentation

◆ addon_mods_paths

std::unordered_map<std::string, std::string> SubgameSpec::addon_mods_paths

Map from virtual path to mods path.

Referenced by ServerModManager::ServerModManager(), and SubgameSpec().

◆ aliases

std::unordered_set<std::string> SubgameSpec::aliases

All worlds are marked with a specific gameid.

To allow inheriting worlds by a game with different gameid after deprecation or renaming, this set contains the gameid values that used to refer to the game and may be used to automatically find the best matching gameid.

◆ author

std::string SubgameSpec::author

◆ deprecation_msgs

std::vector<const char *> SubgameSpec::deprecation_msgs

Referenced by checkAndLog(), and getSubgameSpec().

◆ first_mod

std::string SubgameSpec::first_mod

◆ gamemods_path

std::string SubgameSpec::gamemods_path

◆ id

◆ last_mod

std::string SubgameSpec::last_mod

◆ path

◆ release

int SubgameSpec::release

◆ title

std::string SubgameSpec::title

The documentation for this struct was generated from the following files: