Fix server save load: dispatch as complete save when applicable
This commit is contained in:
@@ -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));
|
||||||
E.importSaveGame(parsed);
|
if (n.isCompleteSavegame(parsed)) {
|
||||||
|
await u.getInstance().importCompleteSavegame(parsed);
|
||||||
|
} else {
|
||||||
|
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");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user