From 4f00639969ec734d74a32f5c9317936382e88b4e Mon Sep 17 00:00:00 2001 From: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com> Date: Sat, 18 Apr 2020 20:19:52 +0200 Subject: [PATCH] Fix: Modded strategic resource without tech prerequisite crashes game (#2460) --- core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt b/core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt index fe4471d6..9ea284ca 100644 --- a/core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt +++ b/core/src/com/unciv/ui/worldscreen/WorldScreenTopBar.kt @@ -134,7 +134,7 @@ class WorldScreenTopBar(val worldScreen: WorldScreen) : Table() { .filter { it.resourceType == ResourceType.Strategic } val civResources = civInfo.getCivResources() for (resource in revealedStrategicResources) { - val isRevealed = civInfo.tech.isResearched(resource.revealedBy!!) + val isRevealed = resource.revealedBy == null || civInfo.tech.isResearched(resource.revealedBy!!) resourceLabels[resource.name]!!.isVisible = isRevealed resourceImages[resource.name]!!.isVisible = isRevealed if (!civResources.any { it.resource==resource}) resourceLabels[resource.name]!!.setText("0")