Resolves #10792 - 'unique is requirement for tech' only looks at tech conditional

This commit is contained in:
Yair Morgenstern 2023-12-22 09:35:04 +02:00
parent beced92a69
commit c08270362e

View File

@ -49,7 +49,7 @@ class Technology: RulesetObject() {
// then IHasUniques.techsRequiredByUniques() will list this tech as required (because it is),
// but uniqueIsRequirementForThisTech() will *not* identify that OnlyAvailableWhen as a requirement for this tech (because it's more complicated than that).
&& unique.conditionals.size == 1
&& unique.conditionals[0].params[0] == name
&& unique.conditionals[0].let { it.type == UniqueType.ConditionalTech && it.params[0] == name }
fun uniqueIsNotRequirementForThisTech(unique: Unique): Boolean = !uniqueIsRequirementForThisTech(unique)
}