Index: ps/trunk/binaries/data/mods/public/gui/common/functions_utility_loadsave.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/common/functions_utility_loadsave.js +++ ps/trunk/binaries/data/mods/public/gui/common/functions_utility_loadsave.js @@ -5,8 +5,7 @@ function isCompatibleSavegame(metadata, engineInfo) { - return engineInfo && hasSameSavegameVersion(metadata, engineInfo) && - hasSameEngineVersion(metadata, engineInfo) & hasSameMods(metadata, engineInfo); + return engineInfo && hasSameEngineVersion(metadata, engineInfo) & hasSameMods(metadata, engineInfo); } function generateSavegameDateString(metadata, engineInfo) @@ -33,14 +32,6 @@ /** * Check the version compatibility between the saved game to be loaded and the engine */ -function hasSameSavegameVersion(metadata, engineInfo) -{ - return metadata.version_major == engineInfo.version_major; -} - -/** - * Check the version compatibility between the saved game to be loaded and the engine - */ function hasSameEngineVersion(metadata, engineInfo) { return metadata.engine_version && metadata.engine_version == engineInfo.engine_version; Index: ps/trunk/binaries/data/mods/public/gui/loadgame/load.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/loadgame/load.js +++ ps/trunk/binaries/data/mods/public/gui/loadgame/load.js @@ -135,9 +135,8 @@ let engineInfo = Engine.GetEngineInfo(); let sameMods = hasSameMods(metadata, engineInfo); let sameEngineVersion = hasSameEngineVersion(metadata, engineInfo); - let sameSavegameVersion = hasSameSavegameVersion(metadata, engineInfo); - if (sameEngineVersion && sameSavegameVersion && sameMods) + if (sameEngineVersion && sameMods) { reallyLoadGame(gameId); return; @@ -155,12 +154,6 @@ else message += "\n" + translate("It needs an older version of 0 A.D."); - if (!sameSavegameVersion) - message += "\n" + sprintf(translate("It needs 0 A.D. savegame version %(requiredVersion)s, while you have savegame version %(currentVersion)s."), { - "requiredVersion": metadata.version_major, - "currentVersion": engineInfo.version_major - }); - if (!sameMods) { if (!metadata.mods) Index: ps/trunk/source/ps/SavedGame.cpp =================================================================== --- ps/trunk/source/ps/SavedGame.cpp +++ ps/trunk/source/ps/SavedGame.cpp @@ -33,12 +33,8 @@ #include "scriptinterface/ScriptInterface.h" #include "simulation2/Simulation2.h" -static const int SAVED_GAME_VERSION_MAJOR = 1; // increment on incompatible changes to the format -static const int SAVED_GAME_VERSION_MINOR = 0; // increment on compatible changes to the format - // TODO: we ought to check version numbers when loading files - Status SavedGames::SavePrefix(const CStrW& prefix, const CStrW& description, CSimulation2& simulation, const shared_ptr& guiMetadataClone) { // Determine the filename to save under @@ -85,8 +81,6 @@ JS::RootedValue metadata(cx); JS::RootedValue initAttributes(cx, simulation.GetInitAttributes()); simulation.GetScriptInterface().Eval("({})", &metadata); - simulation.GetScriptInterface().SetProperty(metadata, "version_major", SAVED_GAME_VERSION_MAJOR); - simulation.GetScriptInterface().SetProperty(metadata, "version_minor", SAVED_GAME_VERSION_MINOR); simulation.GetScriptInterface().SetProperty(metadata, "engine_version", std::string(engine_version)); simulation.GetScriptInterface().SetProperty(metadata, "mods", g_modsLoaded); simulation.GetScriptInterface().SetProperty(metadata, "time", (double)now); @@ -301,8 +295,6 @@ JS::RootedValue metainfo(cx); scriptInterface.Eval("({})", &metainfo); - scriptInterface.SetProperty(metainfo, "version_major", SAVED_GAME_VERSION_MAJOR); - scriptInterface.SetProperty(metainfo, "version_minor", SAVED_GAME_VERSION_MINOR); scriptInterface.SetProperty(metainfo, "engine_version", std::string(engine_version)); scriptInterface.SetProperty(metainfo, "mods", g_modsLoaded);