mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
fix(add river): get id as the biggest id + 1, not the last id + 1
This commit is contained in:
parent
5ca3ac44a4
commit
d48f9b3cab
5 changed files with 51 additions and 13 deletions
|
|
@ -626,10 +626,11 @@ function addRiverOnClick() {
|
|||
getType,
|
||||
getWidth,
|
||||
getOffset,
|
||||
getApproximateLength
|
||||
getApproximateLength,
|
||||
getNextId
|
||||
} = Rivers;
|
||||
const riverCells = [];
|
||||
let riverId = rivers.length ? last(rivers).i + 1 : 1;
|
||||
let riverId = getNextId(rivers);
|
||||
let parent = riverId;
|
||||
|
||||
const initialFlux = grid.cells.prec[cells.g[i]];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue