1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Reworked mod handling in Launcher in order to unify code with lib

This commit is contained in:
Ivan Savenko
2024-11-12 20:00:21 +00:00
parent 4945370fe3
commit f8724b9558
24 changed files with 746 additions and 1127 deletions

View File

@@ -69,13 +69,13 @@ class ModsStorage : boost::noncopyable
std::map<TModID, ModDescription> mods;
public:
ModsStorage(const TModList & modsToLoad);
ModsStorage(const TModList & modsToLoad, const std::vector<JsonNode> & repositoryList);
const ModDescription & getMod(const TModID & fullID) const;
};
/// Provides public interface to access mod state
class ModManager : boost::noncopyable
class DLL_LINKAGE ModManager : boost::noncopyable
{
/// all currently active mods, in their load order
TModList activeMods;
@@ -92,11 +92,13 @@ class ModManager : boost::noncopyable
void addNewModsToPreset();
public:
ModManager(const std::vector<JsonNode> & repositoryList);
ModManager();
~ModManager();
const ModDescription & getModDescription(const TModID & modID) const;
const TModList & getActiveMods() const;
const TModList & getAllMods() const;
bool isModActive(const TModID & modID) const;
};