mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 18:11:24 +01:00
adjust to align with master
This commit is contained in:
parent
b4211916f2
commit
063c440c37
3 changed files with 10 additions and 9 deletions
|
|
@ -8395,6 +8395,10 @@
|
||||||
<script src="modules/burgs-and-states.js?v=1.99.05"></script>
|
<script src="modules/burgs-and-states.js?v=1.99.05"></script>
|
||||||
<script src="modules/routes-generator.js?v=1.99.04"></script>
|
<script src="modules/routes-generator.js?v=1.99.04"></script>
|
||||||
<script src="modules/religions-generator.js?v=1.99.05"></script>
|
<script src="modules/religions-generator.js?v=1.99.05"></script>
|
||||||
|
<script src="modules/resources-generator.js?v=1.100.00"></script>
|
||||||
|
<script src="modules/provinces-generator.js?v=1.100.00"></script>
|
||||||
|
<script src="modules/production-generator.js?v=1.100.00"></script>
|
||||||
|
<script src="modules/trade-generator.js?v=1.100.00"></script>
|
||||||
<script src="modules/military-generator.js?v=1.99.00"></script>
|
<script src="modules/military-generator.js?v=1.99.00"></script>
|
||||||
<script src="modules/markers-generator.js?v=1.103.02"></script>
|
<script src="modules/markers-generator.js?v=1.103.02"></script>
|
||||||
<script src="modules/zones-generator.js?v=1.100.00"></script>
|
<script src="modules/zones-generator.js?v=1.100.00"></script>
|
||||||
|
|
|
||||||
|
|
@ -887,7 +887,6 @@ window.BurgsAndStates = (() => {
|
||||||
state.salesTax = maxTax ? rn(Math.random() * maxTax, 2) : 0;
|
state.salesTax = maxTax ? rn(Math.random() * maxTax, 2) : 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
generate,
|
generate,
|
||||||
expandStates,
|
expandStates,
|
||||||
|
|
@ -906,8 +905,6 @@ window.BurgsAndStates = (() => {
|
||||||
defineTaxes,
|
defineTaxes,
|
||||||
updateCultures,
|
updateCultures,
|
||||||
getCloseToEdgePoint,
|
getCloseToEdgePoint,
|
||||||
defineTaxes,
|
defineTaxes
|
||||||
generateProvinces,
|
|
||||||
updateCultures
|
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
@ -66,7 +66,7 @@ window.Production = (function () {
|
||||||
cells.h[cell] >= 50 && HILLS_PRODUCTION.forEach(({resource, production}) => addResource(resource, production));
|
cells.h[cell] >= 50 && HILLS_PRODUCTION.forEach(({resource, production}) => addResource(resource, production));
|
||||||
}
|
}
|
||||||
|
|
||||||
const queue = new PriorityQueue({comparator: (a, b) => b.priority - a.priority});
|
const queue = new FlatQueue();
|
||||||
for (const resourceId in resourcesPull) {
|
for (const resourceId in resourcesPull) {
|
||||||
const baseProduction = resourcesPull[resourceId];
|
const baseProduction = resourcesPull[resourceId];
|
||||||
const resource = Resources.get(+resourceId);
|
const resource = Resources.get(+resourceId);
|
||||||
|
|
@ -79,7 +79,7 @@ window.Production = (function () {
|
||||||
|
|
||||||
const basePriority = production * value;
|
const basePriority = production * value;
|
||||||
const priority = basePriority * (isFood ? FOOD_MULTIPLIER : 1);
|
const priority = basePriority * (isFood ? FOOD_MULTIPLIER : 1);
|
||||||
queue.queue({resourceId: +resourceId, basePriority, priority, production, isFood});
|
queue.push({resourceId: +resourceId, basePriority, priority, production, isFood},0);
|
||||||
}
|
}
|
||||||
|
|
||||||
let foodProduced = 0;
|
let foodProduced = 0;
|
||||||
|
|
@ -90,7 +90,7 @@ window.Production = (function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
for (let i = 0; i < population; i++) {
|
for (let i = 0; i < population; i++) {
|
||||||
const occupation = queue.dequeue();
|
const occupation = queue.pop();
|
||||||
const {resourceId, production, basePriority, isFood} = occupation;
|
const {resourceId, production, basePriority, isFood} = occupation;
|
||||||
addProduction(resourceId, production);
|
addProduction(resourceId, production);
|
||||||
if (isFood) foodProduced += production;
|
if (isFood) foodProduced += production;
|
||||||
|
|
@ -99,7 +99,7 @@ window.Production = (function () {
|
||||||
const newBasePriority = basePriority / 2;
|
const newBasePriority = basePriority / 2;
|
||||||
const newPriority = newBasePriority * foodModifier;
|
const newPriority = newBasePriority * foodModifier;
|
||||||
|
|
||||||
queue.queue({...occupation, basePriority: newBasePriority, priority: newPriority});
|
queue.push({...occupation, basePriority: newBasePriority, priority: newPriority},0);
|
||||||
}
|
}
|
||||||
|
|
||||||
burg.produced = {};
|
burg.produced = {};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue