mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 12:01:23 +01:00
Update URL and add saving cells
This commit is contained in:
parent
c477c8dfcd
commit
f2f3f83d86
2 changed files with 8 additions and 6 deletions
|
|
@ -202,12 +202,14 @@ function downloadStates() {
|
||||||
link.click();
|
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 blob = new Blob([mapData], { type: "text/plain" });
|
||||||
const URL = window.URL.createObjectURL(blob);
|
const URL = window.URL.createObjectURL(blob);
|
||||||
const link = document.createElement("a");
|
const link = document.createElement("a");
|
||||||
link.download = getFileName() + "-notes.json";
|
link.download = getFileName() + "-cells.json";
|
||||||
link.href = URL;
|
link.href = URL;
|
||||||
link.click();
|
link.click();
|
||||||
}
|
}
|
||||||
|
|
@ -234,7 +236,7 @@ function dowloadMap() {
|
||||||
downloadMarkers();
|
downloadMarkers();
|
||||||
downloadBurgs();
|
downloadBurgs();
|
||||||
downloadCultures();
|
downloadCultures();
|
||||||
downloadNotes();
|
downloadCells();
|
||||||
downloadReligions();
|
downloadReligions();
|
||||||
downloadPopRates();
|
downloadPopRates();
|
||||||
downloadStates();
|
downloadStates();
|
||||||
|
|
|
||||||
|
|
@ -574,8 +574,8 @@ function editBurg(id) {
|
||||||
if (people > 900) townSize = "medium";
|
if (people > 900) townSize = "medium";
|
||||||
if (people > 2_000) townSize = "average";
|
if (people > 2_000) townSize = "average";
|
||||||
if (people > 5_500) townSize = "big";
|
if (people > 5_500) townSize = "big";
|
||||||
const baseURL = "http://localhost:9090/town/";
|
const baseURL = "http://localhost:9090/world/";
|
||||||
const url = `${baseURL}${worldName}_${name}-${burgCulture}/${townSize}`;
|
const url = `${baseURL}${worldName}/burg/${burg.i}`;
|
||||||
|
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue