Resolved #9333 - Improperly configured mod conditionals do not cause crash

This commit is contained in:
Yair Morgenstern 2023-05-07 09:52:59 +03:00
parent 32041d5b49
commit 7b5ed07805

View File

@ -125,7 +125,7 @@ class Unique(val text: String, val sourceObjectType: UniqueTarget? = null, val s
): Boolean { ): Boolean {
val nonConditionalConditionTypes = setOf(UniqueTarget.TriggerCondition, UniqueTarget.UnitTriggerCondition, UniqueTarget.UnitActionModifier) val nonConditionalConditionTypes = setOf(UniqueTarget.TriggerCondition, UniqueTarget.UnitTriggerCondition, UniqueTarget.UnitActionModifier)
if (condition.type!!.targetTypes.any { it in nonConditionalConditionTypes }) if (condition.type?.targetTypes?.any { it in nonConditionalConditionTypes } == true)
return true // not a filtering condition return true // not a filtering condition
fun ruleset() = state.civInfo!!.gameInfo.ruleset fun ruleset() = state.civInfo!!.gameInfo.ruleset