mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
Add extra infomation to burgs Export
Exports citadel status, walls plaza, temple, and shanty with the CSV export for burgs.
This commit is contained in:
parent
8ecb3be281
commit
6d9ebb3360
1 changed files with 8 additions and 2 deletions
|
|
@ -368,7 +368,7 @@ function editBurgs() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function downloadBurgsData() {
|
function downloadBurgsData() {
|
||||||
let data = "Id,Burg,Province,State,Culture,Religion,Population,Longitude,Latitude,Elevation ("+heightUnit.value+"),Capital,Port\n"; // headers
|
let data = "Id,Burg,Province,State,Culture,Religion,Population,Longitude,Latitude,Elevation ("+heightUnit.value+"),Capital,Port,Citadel,Walls,Plaza,Temple,Shanty\n"; // headers
|
||||||
const valid = pack.burgs.filter(b => b.i && !b.removed); // all valid burgs
|
const valid = pack.burgs.filter(b => b.i && !b.removed); // all valid burgs
|
||||||
|
|
||||||
valid.forEach(b => {
|
valid.forEach(b => {
|
||||||
|
|
@ -388,7 +388,13 @@ function editBurgs() {
|
||||||
|
|
||||||
// add status data
|
// add status data
|
||||||
data += b.capital ? "capital," : ",";
|
data += b.capital ? "capital," : ",";
|
||||||
data += b.port ? "port\n" : "\n";
|
data += b.port ? "port," : ",";
|
||||||
|
data += b.citadel ? "citadel," : ",";
|
||||||
|
data += b.walls ? "walls," : ",";
|
||||||
|
data += b.plaza ? "plaza," : ",";
|
||||||
|
data += b.temple ? "temple," : ",";
|
||||||
|
data += b.shanty ? "shanty\n" : "\n";
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataBlob = new Blob([data], {type: "text/plain"});
|
const dataBlob = new Blob([data], {type: "text/plain"});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue