Load dummy map as complete save if applicable
This commit is contained in:
@@ -6195,7 +6195,12 @@
|
|||||||
let data;
|
let data;
|
||||||
try { data = JSON.parse(text); }
|
try { data = JSON.parse(text); }
|
||||||
catch { data = JSON.parse(n.decompressJsonFromString(text)); }
|
catch { data = JSON.parse(n.decompressJsonFromString(text)); }
|
||||||
u.getInstance().importMap(data);
|
const inst = u.getInstance();
|
||||||
|
if (n.isCompleteSavegame(data)) {
|
||||||
|
await inst.importCompleteSavegame(data);
|
||||||
|
} else {
|
||||||
|
inst.importMap(data);
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
n.showToast("Load failed", "Could not load the dummy map.", "danger");
|
n.showToast("Load failed", "Could not load the dummy map.", "danger");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user