mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
feat: allow to crean data in case of load error
This commit is contained in:
parent
80da2f0cda
commit
2d0030e3d4
4 changed files with 8 additions and 5 deletions
|
|
@ -8072,7 +8072,7 @@
|
||||||
<script src="modules/ui/style-presets.js?v=1.100.00"></script>
|
<script src="modules/ui/style-presets.js?v=1.100.00"></script>
|
||||||
<script src="modules/ui/general.js?v=1.100.00"></script>
|
<script src="modules/ui/general.js?v=1.100.00"></script>
|
||||||
<script src="modules/ui/options.js?v=1.105.0"></script>
|
<script src="modules/ui/options.js?v=1.105.0"></script>
|
||||||
<script src="main.js?v=1.105.2"></script>
|
<script src="main.js?v=1.105.9"></script>
|
||||||
|
|
||||||
<script defer src="modules/relief-icons.js?v=1.99.05"></script>
|
<script defer src="modules/relief-icons.js?v=1.99.05"></script>
|
||||||
<script defer src="modules/ui/style.js?v=1.104.0"></script>
|
<script defer src="modules/ui/style.js?v=1.104.0"></script>
|
||||||
|
|
@ -8118,7 +8118,7 @@
|
||||||
<script defer src="libs/rgbquant.min.js"></script>
|
<script defer src="libs/rgbquant.min.js"></script>
|
||||||
<script defer src="libs/jquery.ui.touch-punch.min.js"></script>
|
<script defer src="libs/jquery.ui.touch-punch.min.js"></script>
|
||||||
<script defer src="modules/io/save.js?v=1.100.00"></script>
|
<script defer src="modules/io/save.js?v=1.100.00"></script>
|
||||||
<script defer src="modules/io/load.js?v=1.105.5"></script>
|
<script defer src="modules/io/load.js?v=1.105.9"></script>
|
||||||
<script defer src="modules/io/cloud.js?v=1.99.00"></script>
|
<script defer src="modules/io/cloud.js?v=1.99.00"></script>
|
||||||
<script defer src="modules/io/export.js?v=1.100.00"></script>
|
<script defer src="modules/io/export.js?v=1.100.00"></script>
|
||||||
|
|
||||||
|
|
|
||||||
2
main.js
2
main.js
|
|
@ -691,7 +691,7 @@ async function generate(options) {
|
||||||
title: "Generation error",
|
title: "Generation error",
|
||||||
width: "32em",
|
width: "32em",
|
||||||
buttons: {
|
buttons: {
|
||||||
"Cleanup data": cleanupData,
|
"Clear cache": () => cleanupData(),
|
||||||
Regenerate: function () {
|
Regenerate: function () {
|
||||||
regenerateMap("generation error");
|
regenerateMap("generation error");
|
||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ function showUploadErrorMessage(error, URL, random) {
|
||||||
title: "Loading error",
|
title: "Loading error",
|
||||||
width: "32em",
|
width: "32em",
|
||||||
buttons: {
|
buttons: {
|
||||||
|
"Clear cache": () => cleanupData(),
|
||||||
OK: function () {
|
OK: function () {
|
||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
}
|
}
|
||||||
|
|
@ -195,6 +196,7 @@ function showUploadMessage(type, mapData, mapVersion) {
|
||||||
$("#alert").dialog({
|
$("#alert").dialog({
|
||||||
title,
|
title,
|
||||||
buttons: {
|
buttons: {
|
||||||
|
"Clear cache": () => cleanupData(),
|
||||||
OK: function () {
|
OK: function () {
|
||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
}
|
}
|
||||||
|
|
@ -735,6 +737,7 @@ async function parseLoadedData(data, mapVersion) {
|
||||||
title: "Loading error",
|
title: "Loading error",
|
||||||
maxWidth: "50em",
|
maxWidth: "50em",
|
||||||
buttons: {
|
buttons: {
|
||||||
|
"Clear cache": () => cleanupData(),
|
||||||
"Select file": function () {
|
"Select file": function () {
|
||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
mapToLoad.click();
|
mapToLoad.click();
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
*
|
*
|
||||||
* Example: 1.102.2 -> Major version 1, Minor version 102, Patch version 2
|
* Example: 1.102.2 -> Major version 1, Minor version 102, Patch version 2
|
||||||
*/
|
*/
|
||||||
const VERSION = "1.105.8";
|
const VERSION = "1.105.9";
|
||||||
if (parseMapVersion(VERSION) !== VERSION) alert("versioning.js: Invalid format or parsing function");
|
if (parseMapVersion(VERSION) !== VERSION) alert("versioning.js: Invalid format or parsing function");
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -58,7 +58,7 @@ if (parseMapVersion(VERSION) !== VERSION) alert("versioning.js: Invalid format o
|
||||||
width: "28em",
|
width: "28em",
|
||||||
position: {my: "center center-4em", at: "center", of: "svg"},
|
position: {my: "center center-4em", at: "center", of: "svg"},
|
||||||
buttons: {
|
buttons: {
|
||||||
"Cleanup data": () => cleanupData(),
|
"Clear cache": () => cleanupData(),
|
||||||
"Don't show again": function () {
|
"Don't show again": function () {
|
||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
localStorage.setItem("version", VERSION);
|
localStorage.setItem("version", VERSION);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue