From f2f3f83d869fc19d7eb7dbb221929cb6c027529f Mon Sep 17 00:00:00 2001 From: howlingsails Date: Mon, 3 Oct 2022 19:55:48 -0700 Subject: [PATCH] Update URL and add saving cells --- modules/save.js | 10 ++++++---- modules/ui/burg-editor.js | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/save.js b/modules/save.js index 0d330f07..2c1ac15a 100644 --- a/modules/save.js +++ b/modules/save.js @@ -202,12 +202,14 @@ function downloadStates() { link.click(); } -function downloadNotes() { - const mapData = JSON.stringify(pack.notes); + + +function downloadCells() { + const mapData = JSON.stringify(pack.cells); const blob = new Blob([mapData], { type: "text/plain" }); const URL = window.URL.createObjectURL(blob); const link = document.createElement("a"); - link.download = getFileName() + "-notes.json"; + link.download = getFileName() + "-cells.json"; link.href = URL; link.click(); } @@ -234,7 +236,7 @@ function dowloadMap() { downloadMarkers(); downloadBurgs(); downloadCultures(); - downloadNotes(); + downloadCells(); downloadReligions(); downloadPopRates(); downloadStates(); diff --git a/modules/ui/burg-editor.js b/modules/ui/burg-editor.js index 7bbe7009..ba5e64ae 100644 --- a/modules/ui/burg-editor.js +++ b/modules/ui/burg-editor.js @@ -574,8 +574,8 @@ function editBurg(id) { if (people > 900) townSize = "medium"; if (people > 2_000) townSize = "average"; if (people > 5_500) townSize = "big"; - const baseURL = "http://localhost:9090/town/"; - const url = `${baseURL}${worldName}_${name}-${burgCulture}/${townSize}`; + const baseURL = "http://localhost:9090/world/"; + const url = `${baseURL}${worldName}/burg/${burg.i}`; return url; }