1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-08 23:22:25 +02:00

First part of submods support.

- VCMI will load mods from Mods directory recursively. Submods must be
placed into additional Mods directory, e.g.
<data dir>/Mods/<mod name>/Mods/<submod name>

- submods will be loaded only if their parent mod was enabled
- submods namespace for objects will be "<parent mod ID>.<submod ID>"

- TODO: Launcher is not aware of submods yet (seems to be working but
may behave incorrectly)
This commit is contained in:
Ivan Savenko
2014-03-15 10:57:34 +00:00
parent 065b8366fb
commit 7f6f125b4c
6 changed files with 193 additions and 156 deletions

View File

@@ -4,6 +4,7 @@
#include "../../lib/VCMIDirs.h"
#include "../../lib/filesystem/Filesystem.h"
#include "../../lib/filesystem/CZipLoader.h"
#include "../../lib/CModHandler.h"
#include "../jsonutils.h"
#include "../launcherdirs.h"
@@ -59,7 +60,9 @@ void CModManager::loadRepository(QString file)
void CModManager::loadMods()
{
auto installedMods = CResourceHandler::getAvailableMods();
CModHandler handler;
handler.loadMods();
auto installedMods = handler.getAllMods();
for (auto modname : installedMods)
{