Update URL and add saving cells

This commit is contained in:
howlingsails 2022-10-03 19:55:48 -07:00
parent c477c8dfcd
commit f2f3f83d86
2 changed files with 8 additions and 6 deletions

View file

@ -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();

View file

@ -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;
}