Merge pull request #319 from Legendsmith/master

Add extra infomation to burgs Export
This commit is contained in:
Azgaar 2019-10-06 17:53:21 +03:00 committed by GitHub
commit ea4e5ce4c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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