Save the running world before importing a world file (t79)
This commit is contained in:
@@ -184,6 +184,10 @@ async function exportWorld() {
|
||||
catch (e) { if (e && e.code !== 'declined') toast('The world file was not saved.'); }
|
||||
}
|
||||
async function importWorldFile(file) {
|
||||
if (GAME.running && !await saveWorld('auto', true)) {
|
||||
toast('The current world could not be saved. Import cancelled.');
|
||||
return;
|
||||
}
|
||||
const progress = (f, s) => showLoading(true, f, s, 'Loading world');
|
||||
progress(0.05, 'Reading the save');
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user