mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-20 12:48:56 +07:00
Updating happiness happens in a different thread so it doesn't impede the update() function
This commit is contained in:
@ -77,6 +77,8 @@ class WorldScreen : CameraStageBaseScreen() {
|
||||
|
||||
|
||||
fun update() {
|
||||
kotlin.concurrent.thread { civInfo.happiness = civInfo.getHappinessForNextTurn().values.sum() }
|
||||
|
||||
if (game.gameInfo.tutorial.contains("CityEntered")) {
|
||||
displayTutorials("AfterCityEntered")
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ class WorldScreenTopBar(val screen: WorldScreen) : Table() {
|
||||
}
|
||||
|
||||
private fun getHappinessText(civInfo: CivilizationInfo): String {
|
||||
var happinessText = civInfo.getHappinessForNextTurn().values.sum().toString()
|
||||
var happinessText = civInfo.happiness.toString()
|
||||
if (civInfo.goldenAges.isGoldenAge())
|
||||
happinessText += " GOLDEN AGE (${civInfo.goldenAges.turnsLeftForCurrentGoldenAge})"
|
||||
else
|
||||
|
Reference in New Issue
Block a user