diff --git a/Fantasy Map Generator.lnk b/Fantasy Map Generator.lnk new file mode 100644 index 00000000..1e1f2012 Binary files /dev/null and b/Fantasy Map Generator.lnk differ diff --git a/Readme.txt b/Readme.txt new file mode 100644 index 00000000..6760d7eb --- /dev/null +++ b/Readme.txt @@ -0,0 +1,5 @@ +Azgaar's Fantasy Map Generator +This is an open-source software available under MIT license +https://github.com/Azgaar/Fantasy-Map-Generator + +To run the tool unzip ALL files and open index.html in browser \ No newline at end of file diff --git a/images/icon.ico b/images/icon.ico new file mode 100644 index 00000000..78e496d0 Binary files /dev/null and b/images/icon.ico differ diff --git a/modules/save-and-load.js b/modules/save-and-load.js index 77da271f..a6eefa6d 100644 --- a/modules/save-and-load.js +++ b/modules/save-and-load.js @@ -296,33 +296,6 @@ async function saveMap() { window.URL.revokeObjectURL(URL); } -// Send .map file to server [test function] -async function sendToURL(URL = "http://localhost:8000/upload.php") { - if (customization) {tip("Map cannot be saved when edit mode is active, please exit the mode and retry", false, "error"); return;} - closeDialogs("#alert"); - - const blob = await getMapData(); - const xhr = new XMLHttpRequest(); - xhr.open("POST", URL, true); - //xhr.setRequestHeader("Content-Type", "blob"); // set request header - xhr.onload = e => console.log("onload", e.responseText); - xhr.onreadystatechange = () => {if (xhr.readyState === 4 && xhr.status === 200) tip(`File is sent to cloud storage`, true, "success", 7000);} - xhr.send(blob); -} - -// Load .map file from server [test function] -async function loadFromCloud() { - ldb.get("lastMap", blob => { - if (blob) { - loadMapPrompt(blob); - } else { - tip("No map stored. Save map to storage first", true, "error", 2000); - console.error("No map stored"); - } - }); - uploadMap(blob); -} - function saveGeoJSON_Cells() { let data = "{ \"type\": \"FeatureCollection\", \"features\": [\n"; const cells = pack.cells, v = pack.vertices; diff --git a/upload.php b/upload.php deleted file mode 100644 index 7cf942bc..00000000 --- a/upload.php +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file