Fix City-States giving untradeable resources (#9923)

This commit is contained in:
SeventhM
2023-08-16 22:50:39 -07:00
committed by GitHub
parent 886f0f8caa
commit 1c85ca8c09

View File

@ -292,6 +292,7 @@ class CivInfoTransientCache(val civInfo: Civilization) {
resourceBonusPercentage += unique.params[0].toFloat() / 100
for (cityStateAlly in civInfo.getKnownCivs().filter { it.getAllyCiv() == civInfo.civName }) {
for (resourceSupply in cityStateAlly.cityStateFunctions.getCityStateResourcesForAlly()) {
if (resourceSupply.resource.hasUnique(UniqueType.CannotBeTraded)) continue
val newAmount = (resourceSupply.amount * resourceBonusPercentage).toInt()
cityStateProvidedResources.add(resourceSupply.copy(amount = newAmount))
}