mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 12:01:23 +01:00
refactor and fix saved grid algo.
This commit is contained in:
parent
4291777bc4
commit
f4b3662cba
7 changed files with 37 additions and 33 deletions
|
|
@ -263,7 +263,9 @@ function getName(id) {
|
|||
}
|
||||
|
||||
function getGraph(currentGraph) {
|
||||
const newGraph = shouldRegenerateGrid(currentGraph) ? generateGrid() : deepCopy(currentGraph);
|
||||
const newGraph = shouldRegenerateGrid(currentGraph)
|
||||
? generateGrid(currentGraph.cellsDesired, currentGraph.generator)
|
||||
: deepCopy(currentGraph);
|
||||
delete newGraph.cells.h;
|
||||
return newGraph;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue