'not shown on world screen' unique accepts civ conditionals

This commit is contained in:
Yair Morgenstern 2024-01-25 19:07:14 +02:00
parent cc8a0ab9eb
commit 36baea9250

View File

@ -7,6 +7,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table
import com.unciv.logic.civilization.Civilization
import com.unciv.models.ruleset.tile.ResourceType
import com.unciv.models.ruleset.tile.TileResource
import com.unciv.models.ruleset.unique.StateForConditionals
import com.unciv.models.ruleset.unique.UniqueType
import com.unciv.ui.components.MayaCalendar
import com.unciv.ui.components.YearTextUtil
@ -91,7 +92,7 @@ internal class WorldScreenTopBarResources(topbar: WorldScreenTopBar) : ScalingTa
for ((index, resourceActors) in resourceActors.withIndex()) {
val (resource, label, icon) = resourceActors
if (resource.hasUnique(UniqueType.NotShownOnWorldScreen)) continue
if (resource.hasUnique(UniqueType.NotShownOnWorldScreen, StateForConditionals(civInfo))) continue
val amount = civResources[resource.name] ?: 0