48 void addModsInPath(
const std::string &path,
const std::string &virtual_path);
53 void addMods(
const std::vector<ModSpec> &new_mods);
67 const std::unordered_map<std::string, std::string> &modPaths);
ModConfiguration is a subset of installed mods.
Definition mod_configuration.h:18
const std::vector< ModSpec > & getUnsatisfiedMods() const
Definition mod_configuration.h:25
void addModsInPath(const std::string &path, const std::string &virtual_path)
Adds all mods in the given path.
Definition mod_configuration.cpp:35
void resolveDependencies()
move mods from m_unsatisfied_mods to m_sorted_mods in an order that satisfies dependencies
Definition mod_configuration.cpp:211
std::vector< ModSpec > m_sorted_mods
Definition mod_configuration.h:78
std::string m_first_mod
Definition mod_configuration.h:75
void checkConflictsAndDeps()
Call this function once all mods have been added.
Definition mod_configuration.cpp:189
std::vector< ModSpec > m_unsatisfied_mods
Definition mod_configuration.h:89
const std::vector< ModSpec > & getMods() const
List of mods sorted such that they can be loaded in the given order with all dependencies being fulfi...
Definition mod_configuration.h:37
std::unordered_set< std::string > m_name_conflicts
Definition mod_configuration.h:98
std::string m_last_mod
Definition mod_configuration.h:76
std::string getUnsatisfiedModsError() const
Definition mod_configuration.cpp:15
void addModsFromConfig(const std::string &settings_path, const std::unordered_map< std::string, std::string > &modPaths)
Adds mods specified by a world.mt config.
Definition mod_configuration.cpp:110
bool isConsistent() const
Definition mod_configuration.h:23
void addMods(const std::vector< ModSpec > &new_mods)
Adds all mods in new_mods
Definition mod_configuration.cpp:40
void addGameMods(const SubgameSpec &gamespec)
Adds game mods.
Definition mod_configuration.cpp:100