Просмотр исходного кода

Make loading an autosave a manual action

Otherwise, you could load a giant scene, close the browser, and be stuck with
it forever!
tags/v0.1.0
Fen Dweller 6 лет назад
Родитель
Сommit
b005952256
1 измененных файлов: 9 добавлений и 5 удалений
  1. +9
    -5
      macrovision.js

+ 9
- 5
macrovision.js Просмотреть файл

@@ -1101,6 +1101,11 @@ function prepareMenu() {
name: "Load",
id: "menu-load",
icon: "fas fa-upload"
},
{
name: "Load Autosave",
id: "menu-load-autosave",
icon: "fas fa-redo"
}
]
].forEach(group => {
@@ -1355,11 +1360,7 @@ document.addEventListener("DOMContentLoaded", () => {
param = new URL(window.location.href).searchParams.get("scene");

if (param === null) {
if (loadScene("autosave")) {
deleteScene("autosave");
} else {
scenes["Default"]();
}
scenes["Default"]();
}
else {
@@ -1550,6 +1551,9 @@ document.addEventListener("DOMContentLoaded", () => {
loadScene();
});

document.querySelector("#menu-load-autosave").addEventListener("click", e => {
loadScene("autosave");
});
clearEntityOptions();
clearViewOptions();
clearAttribution();


Загрузка…
Отмена
Сохранить