mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 18:11:24 +01:00
fix(routes): connect new burg to land route only
This commit is contained in:
parent
fd9e010153
commit
8dad1a3bac
3 changed files with 11 additions and 9 deletions
|
|
@ -360,7 +360,8 @@ window.Routes = (function () {
|
|||
// connect cell with routes system by land
|
||||
function connect(cellId) {
|
||||
const getCost = createCostEvaluator({isWater: false, connections: new Map()});
|
||||
const pathCells = findPath(cellId, isConnected, getCost);
|
||||
const isExit = cellId => isLand(cellId) && isConnected(cellId);
|
||||
const pathCells = findPath(cellId, isExit, getCost);
|
||||
if (!pathCells) return;
|
||||
|
||||
const pointsArray = preparePointsArray();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue