mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 03:51:23 +01:00
changed biome to use pack instead of its own variable
This commit is contained in:
parent
23c9538b79
commit
fe51098b16
10 changed files with 39 additions and 41 deletions
|
|
@ -173,7 +173,7 @@
|
|||
for (const c of cells.c[n]) {
|
||||
if (cells.h[c] < 20) continue; // ignore water cells
|
||||
const stateChangeCost = cells.state && cells.state[c] !== cells.state[n] ? 400 : 0; // trails tend to lay within the same state
|
||||
const habitedCost = Math.max(100 - biomesData.biomeList[cells.biome[c]].habitability, 0); // routes tend to lay within populated areas
|
||||
const habitedCost = Math.max(100 - pack.biomes[cells.biome[c]].habitability, 0); // routes tend to lay within populated areas
|
||||
const heightChangeCost = Math.abs(cells.h[c] - cells.h[n]) * 10; // routes tend to avoid elevation changes
|
||||
const cellCoast = 10 + stateChangeCost + habitedCost + heightChangeCost;
|
||||
const totalCost = p + (cells.road[c] || cells.burg[c] ? cellCoast / 3 : cellCoast);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue