mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 18:11:24 +01:00
moved references to globalThis
This commit is contained in:
parent
be168b11e1
commit
7903cfcd65
5 changed files with 6 additions and 6 deletions
|
|
@ -286,7 +286,7 @@ window.BurgsAndStates = (() => {
|
|||
const {cells, states, cultures, burgs} = pack;
|
||||
|
||||
cells.state = cells.state || new Uint16Array(cells.i.length);
|
||||
const queue = new PriorityQueue({comparator: (a, b) => a.p - b.p});
|
||||
const queue = new globalThis.PriorityQueue({comparator: (a, b) => a.p - b.p});
|
||||
const cost = [];
|
||||
|
||||
const globalGrowthRate = byId("growthRate").valueAsNumber || 1;
|
||||
|
|
|
|||
|
|
@ -518,7 +518,7 @@ window.Cultures = (function () {
|
|||
TIME && console.time("expandCultures");
|
||||
const {cells, cultures} = pack;
|
||||
|
||||
const queue = new PriorityQueue({comparator: (a, b) => a.priority - b.priority});
|
||||
const queue = new globalThis.PriorityQueue({comparator: (a, b) => a.priority - b.priority});
|
||||
const cost = [];
|
||||
|
||||
const neutralRate = byId("neutralRate")?.valueAsNumber || 1;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ window.Provinces = (function () {
|
|||
});
|
||||
|
||||
// expand generated provinces
|
||||
const queue = new PriorityQueue({comparator: (a, b) => a.p - b.p});
|
||||
const queue = new globalThis.PriorityQueue({comparator: (a, b) => a.p - b.p});
|
||||
const cost = [];
|
||||
|
||||
provinces.forEach(p => {
|
||||
|
|
|
|||
|
|
@ -695,7 +695,7 @@ window.Religions = (function () {
|
|||
const {cells, routes} = pack;
|
||||
const religionIds = spreadFolkReligions(religions);
|
||||
|
||||
const queue = new PriorityQueue({comparator: (a, b) => a.p - b.p});
|
||||
const queue = new globalThis.PriorityQueue({comparator: (a, b) => a.p - b.p});
|
||||
const cost = [];
|
||||
|
||||
// limit cost for organized religions growth
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ window.Zones = (function () {
|
|||
const cost = [];
|
||||
const maxCells = rand(20, 40);
|
||||
|
||||
const queue = new PriorityQueue({comparator: (a, b) => a.p - b.p});
|
||||
const queue = new globalThis.PriorityQueue({comparator: (a, b) => a.p - b.p});
|
||||
queue.queue({e: burg.cell, p: 0});
|
||||
|
||||
while (queue.length) {
|
||||
|
|
@ -251,7 +251,7 @@ window.Zones = (function () {
|
|||
const cost = [];
|
||||
const maxCells = rand(5, 25);
|
||||
|
||||
const queue = new PriorityQueue({comparator: (a, b) => a.p - b.p});
|
||||
const queue = new globalThis.PriorityQueue({comparator: (a, b) => a.p - b.p});
|
||||
queue.queue({e: burg.cell, p: 0});
|
||||
|
||||
while (queue.length) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue