refactor: river generation start

This commit is contained in:
max 2022-07-19 02:01:56 +03:00
parent 4833a8ab35
commit 4e65616dbc
11 changed files with 285 additions and 265 deletions

View file

@ -20,9 +20,9 @@ export function drawStates() {
// define inner-state lakes to omit on border render
const innerLakes = features.map(feature => {
if (feature.type !== "lake") return false;
if (!feature.shoreline) Lakes.getShoreline(feature);
const states = feature.shoreline.map(i => cells.state[i]);
const shoreline = feature.shoreline || [];
const states = shoreline.map(i => cells.state[i]);
return new Set(states).size > 1 ? false : true;
});