mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-20 09:17:47 +07:00
Civilopedia page now looks normal
This commit is contained in:
parent
d2cb7173c1
commit
2df88c8517
@ -46,7 +46,6 @@ class PopulationManager {
|
||||
// starvation!
|
||||
{
|
||||
population--
|
||||
unassignExtraPopulation()
|
||||
foodStored = 0
|
||||
cityInfo.civInfo.addNotification(cityInfo.name + " is starving!", cityInfo.location, Color.RED)
|
||||
}
|
||||
|
@ -117,9 +117,15 @@ class MapUnit {
|
||||
doPreTurnAction()
|
||||
}
|
||||
|
||||
fun hasUnique(unique:String): Boolean {
|
||||
fun getUniques(): MutableList<String> {
|
||||
val uniques = mutableListOf<String>()
|
||||
val baseUnit = getBaseUnit()
|
||||
return baseUnit.uniques!=null && baseUnit.uniques!!.contains(unique)
|
||||
if(baseUnit.uniques!=null) uniques.addAll(baseUnit.uniques!!)
|
||||
return uniques
|
||||
}
|
||||
|
||||
fun hasUnique(unique:String): Boolean {
|
||||
return getUniques().contains(unique)
|
||||
}
|
||||
|
||||
fun movementAlgs() = UnitMovementAlgorithms(this)
|
||||
@ -130,6 +136,7 @@ class MapUnit {
|
||||
|
||||
fun getViewableTiles(): MutableList<TileInfo> {
|
||||
var visibilityRange = 2
|
||||
visibilityRange += getUniques().count{it=="+1 Visibility Range"}
|
||||
if(hasUnique("Limited Visibility")) visibilityRange-=1
|
||||
return getTile().getViewableTiles(visibilityRange)
|
||||
}
|
||||
|
@ -50,7 +50,6 @@ class CivilopediaScreen : CameraStageBaseScreen() {
|
||||
|
||||
nameList.style = List.ListStyle(nameList.style)
|
||||
nameList.style.fontColorSelected = Color.BLACK
|
||||
nameList.style.font.data.setScale(1.5f)
|
||||
|
||||
val buttons = ArrayList<Button>()
|
||||
var first = true
|
||||
@ -74,7 +73,7 @@ class CivilopediaScreen : CameraStageBaseScreen() {
|
||||
first = false
|
||||
buttonClicked()
|
||||
}
|
||||
button.label.setFontScale(0.7f)
|
||||
|
||||
buttonTable.add(button).width(button.width * 0.7f)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user