1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00

Merge pull request #5017 from IvanSavenko/save_compat_fix

Fix loading of 1.5 and older 1.6 saves
This commit is contained in:
Ivan Savenko 2024-12-02 13:06:26 +02:00 committed by GitHub
commit 22bd3c5621
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,6 +13,7 @@
#include "CModHandler.h"
#include "ModDescription.h"
#include "ModIncompatibility.h"
#include "ModScope.h"
#include "../json/JsonNode.h"
#include "../VCMI_Lib.h"
@ -68,6 +69,9 @@ ModListVerificationStatus ModVerificationInfo::verifyListAgainstLocalMods(const
if(modList.count(m))
continue;
if (m == ModScope::scopeBuiltin())
continue;
if(VLC->modh->getModInfo(m).affectsGameplay())
result[m] = ModVerificationStatus::EXCESSIVE;
}
@ -77,6 +81,9 @@ ModListVerificationStatus ModVerificationInfo::verifyListAgainstLocalMods(const
auto & remoteModId = infoPair.first;
auto & remoteModInfo = infoPair.second;
if (remoteModId == ModScope::scopeBuiltin())
continue;
bool modAffectsGameplay = remoteModInfo.impactsGameplay;
//parent mod affects gameplay if child affects too
for(const auto & subInfoPair : modList)