mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 09:30:45 +00:00
Fix pop being applied while city is Under Construction (#3655)
## Description: Fixes population from a city being applied as soon as it is placed instead of when it is fully built ## Please complete the following: - [X] I have added screenshots for all UI updates - [X] I process any text displayed to the user through translateText() and I've added it to the en.json file - [X] I have added relevant tests to the test directory - [X] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: babyboucher
This commit is contained in:
@@ -771,6 +771,7 @@ export class DefaultConfig implements Config {
|
||||
: 2 * (Math.pow(player.numTilesOwned(), 0.6) * 1000 + 50000) +
|
||||
player
|
||||
.units(UnitType.City)
|
||||
.filter((u) => !u.isUnderConstruction())
|
||||
.map((city) => city.level())
|
||||
.reduce((a, b) => a + b, 0) *
|
||||
this.cityTroopIncrease();
|
||||
|
||||
Reference in New Issue
Block a user