Load dummy map as complete save if applicable

This commit is contained in:
Johannes
2026-03-13 00:57:53 +01:00
parent b2c4b3a9f0
commit 060edf99aa

View File

@@ -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");
} }