From ec65b7e18979bc83ce1fbe5ca6dc0d6b533ec7a2 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Thu, 4 May 2023 10:49:40 +0300 Subject: [PATCH] Resolved #9211 - Show Strategic resources you have by trade even if you have not researched tech for it yet --- .../unciv/ui/screens/worldscreen/WorldScreenTopBar.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/src/com/unciv/ui/screens/worldscreen/WorldScreenTopBar.kt b/core/src/com/unciv/ui/screens/worldscreen/WorldScreenTopBar.kt index 580d354085..486803df72 100644 --- a/core/src/com/unciv/ui/screens/worldscreen/WorldScreenTopBar.kt +++ b/core/src/com/unciv/ui/screens/worldscreen/WorldScreenTopBar.kt @@ -342,13 +342,16 @@ class WorldScreenTopBar(val worldScreen: WorldScreen) : Table() { val civResources = civInfo.getCivResourcesByName() val civResourceSupply = civInfo.getCivResourceSupply() for ((resource, label, icon) in resourceActors) { - if (resource.revealedBy != null && !civInfo.tech.isResearched(resource.revealedBy!!)) - continue if (resource.hasUnique(UniqueType.NotShownOnWorldScreen)) continue + val amount = civResources[resource.name] ?: 0 + + if (resource.revealedBy != null && !civInfo.tech.isResearched(resource.revealedBy!!) + && amount == 0) // You can trade for resources you cannot process yourself yet + continue + resourcesWrapper.add(icon).padLeft(firstPadLeft).padRight(0f) firstPadLeft = 5f - val amount = civResources[resource.name] ?: 0 if (!resource.isStockpiled()) label.setText(amount) else {