mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-25 02:16:06 +07:00
Fix parameter mapping for UnitSupplyPerPop (#11859)
This commit is contained in:
parent
2871fa855d
commit
ce25cbf787
@ -149,8 +149,8 @@ class CivInfoStatsForNextTurn(val civInfo: Civilization) {
|
||||
|
||||
for (unique in civInfo.getMatchingUniques(UniqueType.UnitSupplyPerPop)) {
|
||||
val applicablePopulation = civInfo.cities
|
||||
.filter { it.matchesFilter(unique.params[1]) }
|
||||
.sumOf { it.population.population }
|
||||
.filter { it.matchesFilter(unique.params[2]) }
|
||||
.sumOf { it.population.population / unique.params[1].toInt() }
|
||||
totalSupply += unique.params[0].toDouble() * applicablePopulation
|
||||
}
|
||||
return totalSupply.toInt()
|
||||
|
Loading…
Reference in New Issue
Block a user