From d91d1cf59217d6ff36d45002da3ec7a140b773e8 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sat, 17 Feb 2024 17:18:06 +0100 Subject: [PATCH] feat: don't show auto-update dialog --- modules/io/load.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/io/load.js b/modules/io/load.js index a494b606..93650c78 100644 --- a/modules/io/load.js +++ b/modules/io/load.js @@ -183,22 +183,22 @@ function showUploadMessage(type, mapData, mapVersion) { title = "Newer file"; canBeLoaded = false; } else if (type === "outdated") { - message = `The map version (${mapVersion}) does not match the Generator version (${version}).
That is fine, click OK to the get map auto-updated.
In case of issues please keep using an ${archive} of the Generator`; - title = "Outdated file"; - canBeLoaded = true; + INFO && console.info(`Loading map. Auto-update from ${mapVersion} to ${version}`); + parseLoadedData(mapData, mapVersion); + return; } alertMessage.innerHTML = message; const buttons = { OK: function () { $(this).dialog("close"); - if (canBeLoaded) parseLoadedData(mapData); + if (canBeLoaded) parseLoadedData(mapData, mapVersion); } }; $("#alert").dialog({title, buttons}); } -async function parseLoadedData(data) { +async function parseLoadedData(data, mapVersion) { try { // exit customization if (window.closeDialogs) closeDialogs(); @@ -638,7 +638,7 @@ async function parseLoadedData(data) { ERROR && console.error(error); clearMainTip(); - alertMessage.innerHTML = /* html */ `An error is occured on map loading. Select a different file to load,
generate a new random map or cancel the loading + alertMessage.innerHTML = /* html */ `An error is occured on map loading. Select a different file to load,
generate a new random map or cancel the loading.
Map version: ${mapVersion}. Generator version: ${version}.

${parseError(error)}

`; $("#alert").dialog({