mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 02:01:22 +01:00
v1.3.46
This commit is contained in:
parent
6d0e106f1f
commit
5e9bd86069
2 changed files with 6 additions and 2 deletions
|
|
@ -916,7 +916,9 @@
|
|||
states.forEach(s => {
|
||||
s.provinces = [];
|
||||
if (!s.i || s.removed) return;
|
||||
const stateBurgs = burgs.filter(b => b.state === s.i && !b.removed).sort((a, b) => b.population * gauss(1, .2, .5, 1.5, 3) - a.population);
|
||||
const stateBurgs = burgs.filter(b => b.state === s.i && !b.removed)
|
||||
.sort((a, b) => b.population * gauss(1, .2, .5, 1.5, 3) - a.population)
|
||||
.sort((a, b) => b.capital - a.capital);
|
||||
if (stateBurgs.length < 2) return; // at least 2 provinces are required
|
||||
const provincesNumber = Math.max(Math.ceil(stateBurgs.length * percentage / 100), 2);
|
||||
const form = Object.assign({}, forms[s.form]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue