mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-05 21:11:35 +07:00
Resolve #12197 - kick/skip turn in mutliplayer only active if the game contains the current player ID
This commit is contained in:
parent
327d880b11
commit
6a52382956
@ -399,11 +399,14 @@ class MultiplayerScreen : PickerScreen() {
|
||||
} else {
|
||||
val durationInactive = Duration.between(Instant.ofEpochMilli(preview.currentTurnStartTime), Instant.now())
|
||||
forceResignButton.isVisible =
|
||||
preview.getPlayerCiv(game.settings.multiplayer.userId)?.civName == Constants.spectator
|
||||
|| durationInactive > Duration.ofDays(2)
|
||||
game.settings.multiplayer.userId in preview.civilizations.map { it.playerId } &&
|
||||
preview.getPlayerCiv(game.settings.multiplayer.userId)?.civName == Constants.spectator
|
||||
|| durationInactive > Duration.ofDays(2)
|
||||
}
|
||||
skipTurnButton.isVisible = preview != null && preview.gameParameters.minutesUntilSkipTurn <=
|
||||
(Duration.between(Instant.ofEpochMilli(preview.currentTurnStartTime), Instant.now()).toMinutes())
|
||||
skipTurnButton.isVisible = preview != null
|
||||
&& game.settings.multiplayer.userId in preview.civilizations.map { it.playerId }
|
||||
&& preview.gameParameters.minutesUntilSkipTurn <=
|
||||
Duration.between(Instant.ofEpochMilli(preview.currentTurnStartTime), Instant.now()).toMinutes()
|
||||
|
||||
rightSideButton.enable()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user