refactor: Features module start

This commit is contained in:
Azgaar 2024-09-06 14:22:36 +02:00
parent ec236d146b
commit b5fede560b
9 changed files with 315 additions and 160 deletions

View file

@ -215,8 +215,7 @@ function editHeightmap(options) {
pack.religions = [];
const erosionAllowed = allowErosion.checked;
markFeatures();
markupGridOcean();
Features.markupGrid();
if (erosionAllowed) {
addLakesInDeepDepressions();
openNearSeaLakes();
@ -225,7 +224,7 @@ function editHeightmap(options) {
calculateTemperatures();
generatePrecipitation();
reGraph();
reMarkFeatures();
Features.markupPack();
drawCoastline();
Rivers.generate(erosionAllowed);
@ -337,14 +336,13 @@ function editHeightmap(options) {
zone.selectAll("*").remove();
});
markFeatures();
markupGridOcean();
Features.markupGrid();
if (erosionAllowed) addLakesInDeepDepressions();
OceanLayers();
calculateTemperatures();
generatePrecipitation();
reGraph();
reMarkFeatures();
Features.markupPack();
drawCoastline();
if (erosionAllowed) Rivers.generate(true);