mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 12:01:23 +01:00
refactor(#902): locked states cells to be assigned on start
This commit is contained in:
parent
e984c708d1
commit
aa29f69bbf
2 changed files with 8 additions and 6 deletions
|
|
@ -364,7 +364,7 @@ window.BurgsAndStates = (function () {
|
|||
TIME && console.time("expandStates");
|
||||
const {cells, states, cultures, burgs} = pack;
|
||||
|
||||
cells.state = new Uint16Array(cells.i.length);
|
||||
cells.state = cells.state || new Uint16Array(cells.i.length);
|
||||
const queue = new PriorityQueue({comparator: (a, b) => a.p - b.p});
|
||||
const cost = [];
|
||||
const neutral = (cells.i.length / 5000) * 2500 * neutralInput.value * statesNeutral; // limit cost for state growth
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue