mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
resources ("goods") layers
This commit is contained in:
parent
dd3581956d
commit
830ef826ee
6 changed files with 54 additions and 33 deletions
|
|
@ -739,6 +739,7 @@ function parseLoadedData(data) {
|
|||
coastline = viewbox.select("#coastline");
|
||||
prec = viewbox.select("#prec");
|
||||
population = viewbox.select("#population");
|
||||
goods = viewbox.select("#goods");
|
||||
emblems = viewbox.select("#emblems");
|
||||
labels = viewbox.select("#labels");
|
||||
icons = viewbox.select("#icons");
|
||||
|
|
@ -830,6 +831,7 @@ function parseLoadedData(data) {
|
|||
if (hasChild(population, "line")) turnOn("togglePopulation");
|
||||
if (hasChildren(ice)) turnOn("toggleIce");
|
||||
if (hasChild(prec, "circle")) turnOn("togglePrec");
|
||||
if (hasChildren(goods)) turnOn("toggleResources");
|
||||
if (notHidden(emblems) && hasChild(emblems, "use")) turnOn("toggleEmblems");
|
||||
if (notHidden(labels)) turnOn("toggleLabels");
|
||||
if (notHidden(icons)) turnOn("toggleIcons");
|
||||
|
|
@ -1202,6 +1204,11 @@ function parseLoadedData(data) {
|
|||
gridOverlay.attr("size", null);
|
||||
}
|
||||
|
||||
if (version < 1.7) {
|
||||
// v 1.7 added resources layer
|
||||
goods = viewbox.append("g").attr("id", "goods");
|
||||
}
|
||||
|
||||
void function checkDataIntegrity() {
|
||||
const cells = pack.cells;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue