1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Remove save compatibility with 1.5.X

This commit is contained in:
Ivan Savenko
2025-03-18 11:35:15 +00:00
parent 81759143f4
commit eb3b51a6cf
27 changed files with 86 additions and 542 deletions

View File

@ -51,11 +51,7 @@ struct DLL_LINKAGE SimturnsInfo
h & requiredTurns;
h & optionalTurns;
h & allowHumanWithAI;
if (h.version >= Handler::Version::SAVE_COMPATIBILITY_FIXES)
h & ignoreAlliedContacts;
else
ignoreAlliedContacts = true;
h & ignoreAlliedContacts;
}
};
@ -108,14 +104,7 @@ struct DLL_LINKAGE PlayerSettings
h & heroNameTextId;
h & bonus;
h & color;
if (h.version >= Handler::Version::PLAYER_HANDICAP)
h & handicap;
else
{
enum EHandicap {NO_HANDICAP, MILD, SEVERE};
EHandicap handicapLegacy = NO_HANDICAP;
h & handicapLegacy;
}
h & handicap;
h & name;
h & connectedPlayerIDs;
h & compOnly;
@ -173,24 +162,7 @@ struct DLL_LINKAGE StartInfo : public Serializeable
h & mode;
h & difficulty;
h & playerInfos;
if (h.version < Handler::Version::REMOVE_LIB_RNG)
{
uint32_t oldSeeds = 0;
h & oldSeeds;
h & oldSeeds;
h & oldSeeds;
}
if (h.version < Handler::Version::FOLDER_NAME_REWORK)
{
std::string startTimeLegacy;
h & startTimeLegacy;
struct std::tm tm;
std::istringstream ss(startTimeLegacy);
ss >> std::get_time(&tm, "%Y%m%dT%H%M%S");
startTime = mktime(&tm);
}
else
h & startTime;
h & startTime;
h & fileURI;
h & simturnsInfo;
h & turnTimerInfo;