mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
v1.1.04
This commit is contained in:
parent
1c5f9f7ab6
commit
33d4aa9350
1 changed files with 1 additions and 1 deletions
|
|
@ -360,7 +360,7 @@ function editZones() {
|
||||||
|
|
||||||
function changePopulation(zone) {
|
function changePopulation(zone) {
|
||||||
const dataCells = zones.select("#"+zone).attr("data-cells");
|
const dataCells = zones.select("#"+zone).attr("data-cells");
|
||||||
const cells = dataCells ? dataCells.split(",").map(i => +i) : [];
|
const cells = dataCells ? dataCells.split(",").map(i => +i).filter(i => pack.cells.pop[i]) : [];
|
||||||
if (!cells.length) {tip("Zone does not have any cells, cannot change population", false, "error"); return;}
|
if (!cells.length) {tip("Zone does not have any cells, cannot change population", false, "error"); return;}
|
||||||
const burgs = pack.burgs.filter(b => !b.removed && cells.includes(b.cell));
|
const burgs = pack.burgs.filter(b => !b.removed && cells.includes(b.cell));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue