mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 02:21:24 +01:00
fix: bug fixes, 3d mode controls change to MapContol
This commit is contained in:
parent
07d0729cfc
commit
34b880e10f
19 changed files with 398 additions and 182 deletions
|
|
@ -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};
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue