From 02cb63b62485b17cb1edffe945acdd9bec82fb07 Mon Sep 17 00:00:00 2001 From: Evolvedexperiment Date: Fri, 12 Jun 2020 19:27:18 +0000 Subject: [PATCH] Fix for features of all burgs regenerating when a new burg is added --- modules/burgs-and-states.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/burgs-and-states.js b/modules/burgs-and-states.js index fecfffac..b3083ac6 100644 --- a/modules/burgs-and-states.js +++ b/modules/burgs-and-states.js @@ -188,8 +188,8 @@ console.timeEnd("specifyBurgs"); } - const defineBurgFeatures = function() { - pack.burgs.filter(b => b.i && !b.removed).forEach(b => { + const defineBurgFeatures = function(newburg) { + pack.burgs.filter(b => newburg ? b.i == newburg.i : (b.i && !b.removed)).forEach(b => { const pop = b.population; 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;