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();
|
||||
}
|
||||
|
||||
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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue