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:
Legendsmith 2019-10-06 18:07:45 +11:00
parent 8ecb3be281
commit 6d9ebb3360

View file

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