1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-08 00:39:47 +02:00

Fix save compatibility with 1.4 that was broken by artifact costumes

This commit is contained in:
Ivan Savenko 2024-04-28 20:54:33 +03:00
parent be54836401
commit 151075f088
3 changed files with 6 additions and 4 deletions

View File

@ -112,7 +112,8 @@ public:
h & daysWithoutCastle;
h & cheated;
h & battleBonuses;
h & costumesArtifacts;
if (h.version >= Handler::Version::ARTIFACT_COSTUMES)
h & costumesArtifacts;
h & enteredLosingCheatCode;
h & enteredWinningCheatCode;
h & static_cast<CBonusSystemNode&>(*this);

View File

@ -91,9 +91,9 @@ ModListVerificationStatus ModVerificationInfo::verifyListAgainstLocalMods(const
auto & localModInfo = VLC->modh->getModInfo(remoteModId).getVerificationInfo();
modAffectsGameplay |= VLC->modh->getModInfo(remoteModId).checkModGameplayAffecting();
assert(modAffectsGameplay); // such mods should not be in the list to begin with
// skip it. Such mods should only be present in old saves or if mod changed and no longer affects gameplay
if (!modAffectsGameplay)
continue; // skip it
continue;
if (!vstd::contains(VLC->modh->getActiveMods(), remoteModId))
{

View File

@ -40,6 +40,7 @@ enum class ESerializationVersion : int32_t
MANA_LIMIT, // 837 change MANA_PER_KNOWLEGDE to percentage
BONUS_META_STRING, // 838 bonuses use MetaString instead of std::string for descriptions
TURN_TIMERS_STATE, // 839 current state of turn timers is serialized
ARTIFACT_COSTUMES, // 840 swappable artifacts set added
CURRENT = TURN_TIMERS_STATE
CURRENT = ARTIFACT_COSTUMES
};