refactor: refactor greneration routine

This commit is contained in:
Azgaar 2022-07-10 23:31:03 +03:00
parent d1208b12ec
commit 6b2de4d20e
19 changed files with 401 additions and 292 deletions

View file

@ -6,6 +6,7 @@ import {getMiddlePoint} from "utils/lineUtils";
import {rn} from "utils/numberUtils";
import {aleaPRNG} from "scripts/aleaPRNG";
import {renderLayer} from "layers";
import {markupGridFeatures} from "modules/markup";
window.Submap = (function () {
const isWater = (pack, id) => pack.cells.h[id] < 20;
@ -113,13 +114,12 @@ window.Submap = (function () {
}
stage("Detect features, ocean and generating lakes.");
markFeatures();
markupGridOcean();
markupGridFeatures();
// Warning: addLakesInDeepDepressions can be very slow!
if (options.addLakesInDepressions) {
Lakes.addLakesInDeepDepressions();
Lakes.openNearSeaLakes();
Lakes.addLakesInDeepDepressions(grid);
Lakes.openNearSeaLakes(grid);
}
OceanLayers();