mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 15:27:50 +07:00
Displayed happiness updated within the turn (thanks Am-Per-Sand!)
This commit is contained in:
@ -22,7 +22,7 @@ android {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 26
|
||||
versionCode 98
|
||||
versionName "2.6.1"
|
||||
versionName "2.6.2"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
|
@ -135,6 +135,7 @@ class WorldScreenTopBar(val screen: WorldScreen) : Table() {
|
||||
goldLabel.setText("" + Math.round(civInfo.gold.toFloat()) + goldPerTurn)
|
||||
|
||||
scienceLabel.setText("+" + Math.round(nextTurnStats.science))
|
||||
|
||||
happinessLabel.setText(getHappinessText(civInfo))
|
||||
|
||||
if (civInfo.happiness < 0) {
|
||||
@ -159,7 +160,7 @@ class WorldScreenTopBar(val screen: WorldScreen) : Table() {
|
||||
}
|
||||
|
||||
private fun getHappinessText(civInfo: CivilizationInfo): String {
|
||||
var happinessText = civInfo.happiness.toString()
|
||||
var happinessText = civInfo.getHappinessForNextTurn().values.sum().toString()
|
||||
if (civInfo.goldenAges.isGoldenAge())
|
||||
happinessText += " GOLDEN AGE (${civInfo.goldenAges.turnsLeftForCurrentGoldenAge})"
|
||||
else
|
||||
|
Reference in New Issue
Block a user