fix: bug fixes, 3d mode controls change to MapContol

This commit is contained in:
Azgaar 2025-11-28 15:11:11 +01:00
parent 07d0729cfc
commit 34b880e10f
19 changed files with 398 additions and 182 deletions

View file

@ -106,11 +106,18 @@ window.Lakes = (function () {
return rn(minShoreHeight - LAKE_ELEVATION_DELTA, 2);
};
const defineNames = function () {
pack.features.forEach(feature => {
if (feature.type !== "lake") return;
feature.name = getName(feature);
});
};
const getName = function (feature) {
const landCell = pack.cells.c[feature.firstCell].find(c => pack.cells.h[c] >= 20);
const landCell = feature.shoreline[0];
const culture = pack.cells.culture[landCell];
return Names.getCulture(culture);
};
return {defineClimateData, cleanupLakeData, detectCloseLakes, getHeight, getName};
return {defineClimateData, cleanupLakeData, detectCloseLakes, getHeight, defineNames, getName};
})();