Added a fix for #7380 to complete a game turn and set upToDate for last human player (#9366)

This commit is contained in:
Crsi 2023-05-10 21:18:26 +02:00 committed by GitHub
parent d4af4e1053
commit 3e4ba83bcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ import com.unciv.UncivGame
import com.unciv.logic.GameInfo
import com.unciv.logic.UncivShowableException
import com.unciv.logic.civilization.Civilization
import com.unciv.logic.civilization.PlayerType
import com.unciv.logic.civilization.diplomacy.DiplomaticStatus
import com.unciv.logic.event.EventBus
import com.unciv.logic.map.MapVisualization
@ -601,6 +602,11 @@ class WorldScreen(
debug("Next turn took %sms", System.currentTimeMillis() - startTime)
// Special case: when you are the only human player, the game will always be up to date
if (gameInfo.gameParameters.isOnlineMultiplayer && gameInfoClone.civilizations.filter { it.playerType == PlayerType.Human }.size == 1) {
gameInfoClone.isUpToDate = true
}
startNewScreenJob(gameInfoClone)
}
}