SteamWar/BauSystem2.0
Archiviert
12
0

Fix PrototypeLoader and RegionLoader with version tag

Dieser Commit ist enthalten in:
yoyosource 2021-05-05 12:29:16 +02:00
Ursprung 0164a2bff6
Commit 758f9cd594
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -44,7 +44,7 @@ public class PrototypeLoader {
throw new SecurityException(e.getMessage(), e); throw new SecurityException(e.getMessage(), e);
} }
int currentVersion = yapionObject.getPlainValue("@version"); int currentVersion = yapionObject.getPlainValueOrDefault("@version", -1);
if (currentVersion != loadedVersion && loadedVersion != 0) { if (currentVersion != loadedVersion && loadedVersion != 0) {
throw new SecurityException("Version was not the specified version needed."); throw new SecurityException("Version was not the specified version needed.");
} }

Datei anzeigen

@ -57,7 +57,7 @@ public class RegionLoader {
throw new SecurityException(e.getMessage(), e); throw new SecurityException(e.getMessage(), e);
} }
int currentVersion = yapionObject.getPlainValue("@version"); int currentVersion = yapionObject.getPlainValueOrDefault("@version", -1);
if (currentVersion != loadedVersion && loadedVersion != 0) { if (currentVersion != loadedVersion && loadedVersion != 0) {
throw new SecurityException("Version was not the specified version needed."); throw new SecurityException("Version was not the specified version needed.");
} }