SteamWar/BauSystem2.0
Archiviert
12
0

Fix SimulatorStorage.enable for old simulators
Einige Prüfungen sind fehlgeschlagen
SteamWarCI Build failed

Dieser Commit ist enthalten in:
yoyosource 2022-06-20 21:07:01 +02:00
Ursprung 4f31b38332
Commit 0b57e5f2d9

Datei anzeigen

@ -139,8 +139,16 @@ public class SimulatorStorage implements Enable, Disable {
} }
if (file.getName().endsWith(".yapion")) { if (file.getName().endsWith(".yapion")) {
String name = file.getName().substring(0, file.getName().length() - 7); String name = file.getName().substring(0, file.getName().length() - 7);
SteamwarUser steamwarUser = SteamwarUser.get(Integer.parseInt(name)); try {
convert(file, steamwarUser); SteamwarUser steamwarUser = SteamwarUser.get(Integer.parseInt(name));
convert(file, steamwarUser);
} catch (Exception e) {
try {
file.delete();
} catch (IOException ex) {
// Ignore
}
}
} else { } else {
String name = file.getName().substring(0, file.getName().length() - ".simulator".length()); String name = file.getName().substring(0, file.getName().length() - ".simulator".length());
tntSimulators.put(name, new TNTSimulator(yapionObject)); tntSimulators.put(name, new TNTSimulator(yapionObject));