mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-13 00:04:38 +07:00
Resolved #11339 - Fixed ruleset-dependant building filter activating *when initializing ruleset*
This commit is contained in:
parent
cf0ea815d4
commit
62ce65ec1a
@ -517,8 +517,9 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction {
|
|||||||
replaces -> true
|
replaces -> true
|
||||||
else -> {
|
else -> {
|
||||||
if (uniques.contains(filter)) return true
|
if (uniques.contains(filter)) return true
|
||||||
for (requiredTech: String in requiredTechs())
|
if (::ruleset.isInitialized) // False when loading ruleset and checking buildingsToRemove
|
||||||
if (ruleset.technologies[requiredTech]?.matchesFilter(filter) == true) return true
|
for (requiredTech: String in requiredTechs())
|
||||||
|
if (ruleset.technologies[requiredTech]?.matchesFilter(filter) == true) return true
|
||||||
val stat = Stat.safeValueOf(filter)
|
val stat = Stat.safeValueOf(filter)
|
||||||
return (stat != null && isStatRelated(stat))
|
return (stat != null && isStatRelated(stat))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user