diff --git a/core/src/com/unciv/logic/civilization/managers/UnitManager.kt b/core/src/com/unciv/logic/civilization/managers/UnitManager.kt index 68e4156e14..dbe996053b 100644 --- a/core/src/com/unciv/logic/civilization/managers/UnitManager.kt +++ b/core/src/com/unciv/logic/civilization/managers/UnitManager.kt @@ -70,10 +70,13 @@ class UnitManager(val civInfo:Civilization) { fun placeUnitNearTile(location: Vector2, unitName: String): MapUnit? { val unit = civInfo.gameInfo.tileMap.placeUnitNearTile(location, unitName, civInfo) - if (unit != null) + if (unit != null) { for (unique in civInfo.getTriggeredUniques(UniqueType.TriggerUponGainingUnit)) if (unit.matchesFilter(unique.params[0])) UniqueTriggerActivation.triggerCivwideUnique(unique, civInfo) + if (unit.baseUnit.getResourceRequirementsPerTurn().isNotEmpty()) + civInfo.cache.updateCivResources() + } return unit } fun getCivUnitsSize(): Int = unitList.size diff --git a/core/src/com/unciv/logic/civilization/transients/CivInfoTransientCache.kt b/core/src/com/unciv/logic/civilization/transients/CivInfoTransientCache.kt index 1ef249c1c0..202196b0ca 100644 --- a/core/src/com/unciv/logic/civilization/transients/CivInfoTransientCache.kt +++ b/core/src/com/unciv/logic/civilization/transients/CivInfoTransientCache.kt @@ -278,7 +278,7 @@ class CivInfoTransientCache(val civInfo: Civilization) { for (city in civInfo.cities) newDetailedCivResources.add(city.getCityResources()) for (resourceSupply in newDetailedCivResources) - if(resourceSupply.amount > 0) + if (resourceSupply.amount > 0) resourceSupply.amount = (resourceSupply.amount * civInfo.getResourceModifier(resourceSupply.resource)).toInt() if (!civInfo.isCityState()) {