mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 01:08:25 +07:00
Resolves #10792 - 'unique is requirement for tech' only looks at tech conditional
This commit is contained in:
@ -49,7 +49,7 @@ class Technology: RulesetObject() {
|
|||||||
// then IHasUniques.techsRequiredByUniques() will list this tech as required (because it is),
|
// 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).
|
// 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.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)
|
fun uniqueIsNotRequirementForThisTech(unique: Unique): Boolean = !uniqueIsRequirementForThisTech(unique)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user