mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 06:51:30 -04:00
Buildings not displayed in civilopedia are not show to be obsoleted in tech tree either
This commit is contained in:
parent
575ad9fe78
commit
73c5811297
@ -355,7 +355,7 @@ class GameInfo {
|
||||
if (isInvalidConstruction(construction))
|
||||
city.cityConstructions.constructionQueue.remove(construction)
|
||||
}
|
||||
// And from being in progess
|
||||
// And from being in progress
|
||||
for (construction in city.cityConstructions.inProgressConstructions.keys.toList())
|
||||
if (isInvalidConstruction(construction))
|
||||
city.cityConstructions.inProgressConstructions.remove(construction)
|
||||
|
@ -26,8 +26,7 @@ class TechButton(techName:String, private val techManager: TechManager, isWorldS
|
||||
val percentComplete = (techCost - remainingTech) / techCost.toFloat()
|
||||
add(ImageGetter.getProgressBarVertical(2f, 50f, percentComplete, Color.BLUE, Color.WHITE)).pad(10f)
|
||||
rightSide.add(text).padBottom(5f).row()
|
||||
}
|
||||
else rightSide.add(text).height(25f).padBottom(5f).row()
|
||||
} else rightSide.add(text).height(25f).padBottom(5f).row()
|
||||
|
||||
addTechEnabledIcons(techName, isWorldScreen, rightSide)
|
||||
|
||||
@ -53,7 +52,8 @@ class TechButton(techName:String, private val techManager: TechManager, isWorldS
|
||||
.filter { "Will not be displayed in Civilopedia" !in it.uniques })
|
||||
techEnabledIcons.add(ImageGetter.getConstructionImage(building.name).surroundWithCircle(techIconSize))
|
||||
|
||||
for(building in tech.getObsoletedBuildings(techManager.civInfo) )
|
||||
for (building in tech.getObsoletedBuildings(techManager.civInfo)
|
||||
.filter { "Will not be displayed in Civilopedia" !in it.uniques })
|
||||
techEnabledIcons.add(ImageGetter.getConstructionImage(building.name).surroundWithCircle(techIconSize).apply {
|
||||
val closeImage = ImageGetter.getImage("OtherIcons/Close")
|
||||
closeImage.setSize(techIconSize / 2, techIconSize / 2)
|
||||
@ -63,8 +63,10 @@ class TechButton(techName:String, private val techManager: TechManager, isWorldS
|
||||
})
|
||||
|
||||
for (improvement in ruleset.tileImprovements.values
|
||||
.filter { it.techRequired == techName || it.uniqueObjects.any { u -> u.params.contains(techName) }
|
||||
|| it.uniqueObjects.any { it.placeholderText=="[] once [] is discovered" && it.params[1]==techName } }
|
||||
.filter {
|
||||
it.techRequired == techName || it.uniqueObjects.any { u -> u.params.contains(techName) }
|
||||
|| it.uniqueObjects.any { it.placeholderText == "[] once [] is discovered" && it.params[1] == techName }
|
||||
}
|
||||
.filter { it.uniqueTo == null || it.uniqueTo == civName })
|
||||
if (improvement.name.startsWith("Remove"))
|
||||
techEnabledIcons.add(ImageGetter.getImage("OtherIcons/Stop")).size(techIconSize)
|
||||
|
Loading…
x
Reference in New Issue
Block a user