mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-02 12:24:15 +07:00
Resolved #5530 - fixed "[stats] from all [stat] buildings" check for stat relatedness
This commit is contained in:
parent
9b798b3588
commit
9a7ea263d6
@ -683,7 +683,8 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction {
|
||||
replaces -> true
|
||||
else -> {
|
||||
if (uniques.contains(filter)) return true
|
||||
if (isStats(filter) && isStatRelated(Stat.valueOf(filter))) return true
|
||||
val stat = Stat.values().firstOrNull { it.name == filter }
|
||||
if (stat != null && isStatRelated(stat)) return true
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user