Fixed Civilopedia not showing non-unique buildings and units on techs

This commit is contained in:
yairm210 2024-08-15 12:58:20 +03:00
parent c20944469d
commit 8206101f34

View File

@ -312,7 +312,7 @@ object TechnologyDescriptions {
.filter { .filter {
predicate(it) // expected to be the most selective, thus tested first predicate(it) // expected to be the most selective, thus tested first
&& (it.uniqueTo != null && civInfo?.matchesFilter(it.uniqueTo!!) == true && (it.uniqueTo != null && civInfo?.matchesFilter(it.uniqueTo!!) == true
|| it.uniqueTo == null && civInfo?.getEquivalentBuilding(it) == it) || it.uniqueTo == null && (civInfo == null || civInfo.getEquivalentBuilding(it) == it))
&& !it.isHiddenFromCivilopedia(ruleset) && !it.isHiddenFromCivilopedia(ruleset)
} }
} }
@ -327,7 +327,7 @@ object TechnologyDescriptions {
.filter { .filter {
it.requiredTechs().contains(techName) it.requiredTechs().contains(techName)
&& (it.uniqueTo != null && civInfo?.matchesFilter(it.uniqueTo!!) == true || && (it.uniqueTo != null && civInfo?.matchesFilter(it.uniqueTo!!) == true ||
it.uniqueTo == null && civInfo?.getEquivalentUnit(it) == it) it.uniqueTo == null && (civInfo == null || civInfo.getEquivalentUnit(it) == it))
&& !it.isHiddenFromCivilopedia(ruleset) && !it.isHiddenFromCivilopedia(ruleset)
} }
} }