mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Mod compatibility check is now in a separate class and not part of
ModHandler
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
#include "modding/CModInfo.h"
|
||||
#include "modding/IdentifierStorage.h"
|
||||
#include "modding/CModVersion.h"
|
||||
#include "modding/ActiveModsInSaveList.h"
|
||||
#include "CPlayerState.h"
|
||||
#include "GameSettings.h"
|
||||
#include "ScriptHandler.h"
|
||||
@@ -183,6 +184,7 @@ void CPrivilegedInfoCallback::loadCommonState(Loader & in)
|
||||
|
||||
CMapHeader dum;
|
||||
StartInfo * si = nullptr;
|
||||
ActiveModsInSaveList activeMods;
|
||||
|
||||
logGlobal->info("\tReading header");
|
||||
in.serializer & dum;
|
||||
@@ -190,6 +192,9 @@ void CPrivilegedInfoCallback::loadCommonState(Loader & in)
|
||||
logGlobal->info("\tReading options");
|
||||
in.serializer & si;
|
||||
|
||||
logGlobal->info("\tReading mod list");
|
||||
in.serializer & activeMods;
|
||||
|
||||
logGlobal->info("\tReading gamestate");
|
||||
in.serializer & gs;
|
||||
}
|
||||
@@ -197,12 +202,16 @@ void CPrivilegedInfoCallback::loadCommonState(Loader & in)
|
||||
template<typename Saver>
|
||||
void CPrivilegedInfoCallback::saveCommonState(Saver & out) const
|
||||
{
|
||||
ActiveModsInSaveList activeMods;
|
||||
|
||||
logGlobal->info("Saving lib part of game...");
|
||||
out.putMagicBytes(SAVEGAME_MAGIC);
|
||||
logGlobal->info("\tSaving header");
|
||||
out.serializer & static_cast<CMapHeader&>(*gs->map);
|
||||
logGlobal->info("\tSaving options");
|
||||
out.serializer & gs->scenarioOps;
|
||||
logGlobal->info("\tSaving mod list");
|
||||
out.serializer & activeMods;
|
||||
logGlobal->info("\tSaving gamestate");
|
||||
out.serializer & gs;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user