mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
Merge pull request #482 from evolvedexperiment/fix-burg-add
Fix for burg features regenerating for all burgs when a new burg is added.
This commit is contained in:
commit
9116730c90
1 changed files with 2 additions and 2 deletions
|
|
@ -188,8 +188,8 @@
|
||||||
console.timeEnd("specifyBurgs");
|
console.timeEnd("specifyBurgs");
|
||||||
}
|
}
|
||||||
|
|
||||||
const defineBurgFeatures = function() {
|
const defineBurgFeatures = function(newburg) {
|
||||||
pack.burgs.filter(b => b.i && !b.removed).forEach(b => {
|
pack.burgs.filter(b => newburg ? b.i == newburg.i : (b.i && !b.removed)).forEach(b => {
|
||||||
const pop = b.population;
|
const pop = b.population;
|
||||||
b.citadel = b.capital || pop > 50 && P(.75) || P(.5) ? 1 : 0;
|
b.citadel = b.capital || pop > 50 && P(.75) || P(.5) ? 1 : 0;
|
||||||
b.plaza = pop > 50 || pop > 30 && P(.75) || pop > 10 && P(.5) || P(.25) ? 1 : 0;
|
b.plaza = pop > 50 || pop > 30 && P(.75) || pop > 10 && P(.5) || P(.25) ? 1 : 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue