Merge branch 'master' into geodata

This commit is contained in:
Tom Vogt 2019-09-03 11:50:43 +02:00
commit 552d4ef4dc
19 changed files with 306 additions and 105 deletions

View file

@ -540,7 +540,7 @@ function parseLoadedData(data) {
if (version < 1) {
// 1.0 adds a new religions layer
relig = viewbox.insert("g", "#terrain").attr("id", "cults");
relig = viewbox.insert("g", "#terrain").attr("id", "relig");
Religions.generate();
// 1.0 adds a legend box
@ -601,6 +601,16 @@ function parseLoadedData(data) {
biomesData.color.push("#0b9131");
biomesData.habitability.push(12);
}
if (version == 1) {
// v 1.0 initial code had a bug with religion layer id
if (!relig.size()) relig = viewbox.insert("g", "#terrain").attr("id", "relig");
// v 1.0 initially has Sympathy status then relaced with Friendly
for (const s of pack.states) {
s.diplomacy = s.diplomacy.map(r => r === "Sympathy" ? "Friendly" : r);
}
}
}()
changeMapSize();