From 1c85ca8c09b7e15147b11e694d8a5c9598daf7e2 Mon Sep 17 00:00:00 2001 From: SeventhM <127357473+SeventhM@users.noreply.github.com> Date: Wed, 16 Aug 2023 22:50:39 -0700 Subject: [PATCH] Fix City-States giving untradeable resources (#9923) --- .../unciv/logic/civilization/transients/CivInfoTransientCache.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/com/unciv/logic/civilization/transients/CivInfoTransientCache.kt b/core/src/com/unciv/logic/civilization/transients/CivInfoTransientCache.kt index dd768801f0..ba30a445f3 100644 --- a/core/src/com/unciv/logic/civilization/transients/CivInfoTransientCache.kt +++ b/core/src/com/unciv/logic/civilization/transients/CivInfoTransientCache.kt @@ -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)) }