Displayed happiness updated within the turn (thanks Am-Per-Sand!)

This commit is contained in:
Yair Morgenstern
2018-07-11 21:25:23 +03:00
parent 4196f72a20
commit 3215e0eea9
2 changed files with 3 additions and 2 deletions

View File

@ -22,7 +22,7 @@ android {
minSdkVersion 14
targetSdkVersion 26
versionCode 98
versionName "2.6.1"
versionName "2.6.2"
}
buildTypes {
release {

View File

@ -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