Resolved #11339 - Fixed ruleset-dependant building filter activating *when initializing ruleset*

This commit is contained in:
Yair Morgenstern 2024-03-19 23:52:34 +02:00
parent cf0ea815d4
commit 62ce65ec1a

View File

@ -517,6 +517,7 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction {
replaces -> true
else -> {
if (uniques.contains(filter)) return true
if (::ruleset.isInitialized) // False when loading ruleset and checking buildingsToRemove
for (requiredTech: String in requiredTechs())
if (ruleset.technologies[requiredTech]?.matchesFilter(filter) == true) return true
val stat = Stat.safeValueOf(filter)