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

- modhandler will only validate new, changed or mods that failed

validation last time.
- fixed several issues with modSettings.json file
- some refactoring of modhandler, still needs some work.
This commit is contained in:
Ivan Savenko
2013-11-09 19:10:16 +00:00
parent e01ef8e36a
commit 29e98b2d51
4 changed files with 147 additions and 75 deletions

View File

@@ -71,7 +71,7 @@ void LibClasses::loadFilesystem()
modh = new CModHandler;
logGlobal->infoStream()<<"\tMod handler: "<<loadTime.getDiff();
modh->initialize(CResourceHandler::getAvailableMods());
modh->initializeMods(CResourceHandler::getAvailableMods());
logGlobal->infoStream()<<"\t Mod filesystems: "<<loadTime.getDiff();
logGlobal->infoStream()<<"Basic initialization: "<<totalTime.getDiff();
@@ -92,7 +92,7 @@ void LibClasses::init()
{
CStopWatch pomtime, totalTime;
modh->beforeLoad();
modh->initializeConfig();
createHandler(bth, "Bonus type", pomtime);
@@ -118,8 +118,8 @@ void LibClasses::init()
logGlobal->infoStream()<<"\tInitializing handlers: "<< totalTime.getDiff();
modh->loadGameContent();
modh->reload();
modh->load();
modh->afterLoad();
//FIXME: make sure that everything is ok after game restart
//TODO: This should be done every time mod config changes