Resolved #9211 - Show Strategic resources you have by trade even if you have not researched tech for it yet

This commit is contained in:
Yair Morgenstern 2023-05-04 10:49:40 +03:00
parent a370117301
commit ec65b7e189

View File

@ -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 {