mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-19 16:57:38 +07:00
Resolved #9333 - Improperly configured mod conditionals do not cause crash
This commit is contained in:
parent
32041d5b49
commit
7b5ed07805
@ -125,7 +125,7 @@ class Unique(val text: String, val sourceObjectType: UniqueTarget? = null, val s
|
||||
): Boolean {
|
||||
|
||||
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
|
||||
|
||||
fun ruleset() = state.civInfo!!.gameInfo.ruleset
|
||||
|
Loading…
Reference in New Issue
Block a user