mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-04-04 22:47:23 +02:00
fix: save to storage only for storage option
This commit is contained in:
parent
51a1f3ab44
commit
b6fbc66ec3
3 changed files with 9 additions and 10 deletions
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
// functions to save the project to a file
|
||||
// functions to save the whole .map project
|
||||
async function saveMap(method) {
|
||||
if (customization) return tip("Map cannot be saved in EDIT mode, please complete the edit and retry", false, "error");
|
||||
closeDialogs("#alert");
|
||||
|
|
@ -9,7 +9,7 @@ async function saveMap(method) {
|
|||
const mapData = prepareMapData();
|
||||
const filename = getFileName() + ".map";
|
||||
|
||||
saveToStorage(mapData, method === "storage"); // any method saves to indexedDB
|
||||
if (method === "storage") saveToStorage(mapData, true);
|
||||
if (method === "machine") saveToMachine(mapData, filename);
|
||||
if (method === "dropbox") saveToDropbox(mapData, filename);
|
||||
} catch (error) {
|
||||
|
|
@ -38,7 +38,6 @@ async function saveMap(method) {
|
|||
}
|
||||
|
||||
function prepareMapData() {
|
||||
|
||||
const date = new Date();
|
||||
const dateString = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
|
||||
const license = "File can be loaded in azgaar.github.io/Fantasy-Map-Generator";
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
* For the changes that may be interesting to end users, update the `latestPublicChanges` array below (new changes on top).
|
||||
*/
|
||||
|
||||
const VERSION = "1.113.7";
|
||||
const VERSION = "1.113.8";
|
||||
if (parseMapVersion(VERSION) !== VERSION) alert("versioning.js: Invalid format or parsing function");
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8592,7 +8592,7 @@
|
|||
<script defer src="modules/ui/hotkeys.js?v=1.104.0"></script>
|
||||
<script defer src="libs/rgbquant.min.js"></script>
|
||||
<script defer src="libs/jquery.ui.touch-punch.min.js"></script>
|
||||
<script defer src="modules/io/save.js?v=1.111.0"></script>
|
||||
<script defer src="modules/io/save.js?v=1.113.8"></script>
|
||||
<script defer src="modules/io/load.js?v=1.113.0"></script>
|
||||
<script defer src="modules/io/cloud.js?v=1.106.0"></script>
|
||||
<script defer src="modules/io/export.js?v=1.112.2"></script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue