Resolved #12422 - Comment text is displayed on event choices

This commit is contained in:
yairm210 2024-11-07 18:20:45 +02:00
parent e4253bf007
commit c87ed50a98

View File

@ -6,6 +6,7 @@ import com.unciv.logic.map.mapunit.MapUnit
import com.unciv.models.ruleset.Event
import com.unciv.models.ruleset.EventChoice
import com.unciv.models.ruleset.unique.StateForConditionals
import com.unciv.models.ruleset.unique.UniqueType
import com.unciv.ui.components.UncivTooltip.Companion.addTooltip
import com.unciv.ui.components.extensions.addSeparator
import com.unciv.ui.components.extensions.toTextButton
@ -69,7 +70,7 @@ class RenderEvent(
val lines = (
choice.civilopediaText.asSequence()
+ choice.uniqueObjects.filter { it.isTriggerable }
+ choice.uniqueObjects.filter { it.isTriggerable || it.type == UniqueType.Comment }
.filterNot { it.isHiddenToUsers() }
.map { FormattedLine(it) }
).asIterable()