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:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user