Fix server save load: dispatch as complete save when applicable

This commit is contained in:
Johannes
2026-03-13 01:01:31 +01:00
parent 060edf99aa
commit 73b62575cd

View File

@@ -5939,7 +5939,11 @@
const text = await res.text(); const text = await res.text();
if (n.hasScript(text)) throw "Script found!"; if (n.hasScript(text)) throw "Script found!";
const parsed = JSON.parse(n.decompressJsonFromString(text)); const parsed = JSON.parse(n.decompressJsonFromString(text));
if (n.isCompleteSavegame(parsed)) {
await u.getInstance().importCompleteSavegame(parsed);
} else {
E.importSaveGame(parsed); E.importSaveGame(parsed);
}
} catch (e) { } catch (e) {
n.showToast("Load failed", "Could not load the save from the server.", "danger"); n.showToast("Load failed", "Could not load the save from the server.", "danger");
} }