mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-08 23:08:35 +07:00
Resolved #9211 - Show Strategic resources you have by trade even if you have not researched tech for it yet
This commit is contained in:
@ -342,13 +342,16 @@ class WorldScreenTopBar(val worldScreen: WorldScreen) : Table() {
|
|||||||
val civResources = civInfo.getCivResourcesByName()
|
val civResources = civInfo.getCivResourcesByName()
|
||||||
val civResourceSupply = civInfo.getCivResourceSupply()
|
val civResourceSupply = civInfo.getCivResourceSupply()
|
||||||
for ((resource, label, icon) in resourceActors) {
|
for ((resource, label, icon) in resourceActors) {
|
||||||
if (resource.revealedBy != null && !civInfo.tech.isResearched(resource.revealedBy!!))
|
|
||||||
continue
|
|
||||||
if (resource.hasUnique(UniqueType.NotShownOnWorldScreen)) 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)
|
resourcesWrapper.add(icon).padLeft(firstPadLeft).padRight(0f)
|
||||||
firstPadLeft = 5f
|
firstPadLeft = 5f
|
||||||
val amount = civResources[resource.name] ?: 0
|
|
||||||
if (!resource.isStockpiled())
|
if (!resource.isStockpiled())
|
||||||
label.setText(amount)
|
label.setText(amount)
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user