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