1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Mod management rework, part 1

- Replaced CModInfo class with constant ModDescription class
- Simplified mod loading logic
- Extracted some functionality from ModHandler into separate classes for
future reuse by Launcher
This commit is contained in:
Ivan Savenko
2024-11-09 20:29:07 +00:00
parent c22471fd91
commit ba9e3dca9d
25 changed files with 864 additions and 827 deletions

View File

@@ -14,7 +14,7 @@
VCMI_LIB_NAMESPACE_BEGIN
class IHandlerBase;
class CModInfo;
class ModDescription;
/// internal type to handle loading of one data type (e.g. artifacts, creatures)
class DLL_LINKAGE ContentTypeHandler
@@ -58,15 +58,15 @@ class DLL_LINKAGE CContentHandler
std::map<std::string, ContentTypeHandler> handlers;
bool validateMod(const CModInfo & mod) const;
bool validateMod(const ModDescription & mod) const;
public:
void init();
/// preloads all data from fileList as data from modName.
void preloadData(CModInfo & mod);
void preloadData(const ModDescription & mod);
/// actually loads data in mod
void load(CModInfo & mod);
void load(const ModDescription & mod);
void loadCustom();