mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-06 16:28:40 +07:00
Fix City-States giving untradeable resources (#9923)
This commit is contained in:
@ -292,6 +292,7 @@ class CivInfoTransientCache(val civInfo: Civilization) {
|
|||||||
resourceBonusPercentage += unique.params[0].toFloat() / 100
|
resourceBonusPercentage += unique.params[0].toFloat() / 100
|
||||||
for (cityStateAlly in civInfo.getKnownCivs().filter { it.getAllyCiv() == civInfo.civName }) {
|
for (cityStateAlly in civInfo.getKnownCivs().filter { it.getAllyCiv() == civInfo.civName }) {
|
||||||
for (resourceSupply in cityStateAlly.cityStateFunctions.getCityStateResourcesForAlly()) {
|
for (resourceSupply in cityStateAlly.cityStateFunctions.getCityStateResourcesForAlly()) {
|
||||||
|
if (resourceSupply.resource.hasUnique(UniqueType.CannotBeTraded)) continue
|
||||||
val newAmount = (resourceSupply.amount * resourceBonusPercentage).toInt()
|
val newAmount = (resourceSupply.amount * resourceBonusPercentage).toInt()
|
||||||
cityStateProvidedResources.add(resourceSupply.copy(amount = newAmount))
|
cityStateProvidedResources.add(resourceSupply.copy(amount = newAmount))
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user