mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-19 20:28:56 +07:00
-Terracotta Army, Alhambra, Hanse, Leaning Tower of Pisa, Neuschwanstein, and Hubble Space Telescope are no longer buildable or displayed in the pedia since they are not part of vanilla Civ 5. (#3300)
Their entries were kept in the json files so as to not break pre-existing save files. -Units and buildings that are unbuildable are not shown in the pedia or tech picker as being unlockable by tech
This commit is contained in:
@ -86,7 +86,9 @@ class Technology {
|
||||
fun getEnabledBuildings(civInfo: CivilizationInfo): List<Building> {
|
||||
var enabledBuildings = civInfo.gameInfo.ruleSet.buildings.values.filter {
|
||||
it.requiredTech == name &&
|
||||
(it.uniqueTo == null || it.uniqueTo == civInfo.civName)
|
||||
(it.uniqueTo == null || it.uniqueTo == civInfo.civName) &&
|
||||
"Unbuildable" !in it.uniques
|
||||
|
||||
}
|
||||
val replacedBuildings = enabledBuildings.mapNotNull { it.replaces }
|
||||
enabledBuildings = enabledBuildings.filter { it.name !in replacedBuildings }
|
||||
@ -106,7 +108,8 @@ class Technology {
|
||||
fun getEnabledUnits(civInfo: CivilizationInfo): List<BaseUnit> {
|
||||
var enabledUnits = civInfo.gameInfo.ruleSet.units.values.filter {
|
||||
it.requiredTech == name &&
|
||||
(it.uniqueTo == null || it.uniqueTo == civInfo.civName)
|
||||
(it.uniqueTo == null || it.uniqueTo == civInfo.civName) &&
|
||||
"Unbuildable" !in it.uniques
|
||||
}
|
||||
val replacedUnits = civInfo.gameInfo.ruleSet.units.values.filter { it.uniqueTo == civInfo.civName }
|
||||
.mapNotNull { it.replaces }
|
||||
|
Reference in New Issue
Block a user