mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-12 19:10:12 +07:00
Resolved #4769 - City-states grant copies of their resources, even if they're in use
This commit is contained in:
parent
eb8e76ba08
commit
cb1c70f73b
@ -147,12 +147,14 @@ class CivInfoTransientUpdater(val civInfo: CivilizationInfo) {
|
||||
var resourceBonusPercentage = 1f
|
||||
for (unique in civInfo.getMatchingUniques("Quantity of Resources gifted by City-States increased by []%"))
|
||||
resourceBonusPercentage += unique.params[0].toFloat() / 100
|
||||
for (otherCiv in civInfo.getKnownCivs().filter { it.getAllyCiv() == civInfo.civName }) {
|
||||
for (city in otherCiv.cities) {
|
||||
for (resourceSupply in city.getCityResources())
|
||||
newDetailedCivResources.add(resourceSupply.resource,
|
||||
(resourceSupply.amount * resourceBonusPercentage).toInt(), "City-States")
|
||||
}
|
||||
for (city in civInfo.getKnownCivs().filter { it.getAllyCiv() == civInfo.civName }
|
||||
.flatMap { it.cities }) {
|
||||
for (resourceSupply in city.getCityResources())
|
||||
if (resourceSupply.origin != "Buildings") // IGNORE the fact that they consume their own resources - #4769
|
||||
newDetailedCivResources.add(
|
||||
resourceSupply.resource,
|
||||
(resourceSupply.amount * resourceBonusPercentage).toInt(), "City-States"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user