mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-05 21:11:35 +07:00
Resolved #12230 - MP game with invalid preview cannot be joined
This commit is contained in:
parent
51bbe4f961
commit
b722a62454
@ -385,10 +385,13 @@ class MultiplayerScreen : PickerScreen() {
|
||||
selectedGame = multiplayerGame
|
||||
|
||||
for (button in gameSpecificButtons) button.enable()
|
||||
|
||||
if (multiplayerGame.preview != null) {
|
||||
copyGameIdButton.enable()
|
||||
rightSideButton.enable()
|
||||
} else {
|
||||
copyGameIdButton.disable()
|
||||
rightSideButton.disable()
|
||||
}
|
||||
|
||||
resignButton.isEnabled = multiplayerGame.preview?.getCurrentPlayerCiv()?.playerId == game.settings.multiplayer.userId
|
||||
@ -407,9 +410,7 @@ class MultiplayerScreen : PickerScreen() {
|
||||
&& game.settings.multiplayer.userId in preview.civilizations.map { it.playerId }
|
||||
&& preview.gameParameters.minutesUntilSkipTurn <=
|
||||
Duration.between(Instant.ofEpochMilli(preview.currentTurnStartTime), Instant.now()).toMinutes()
|
||||
|
||||
rightSideButton.enable()
|
||||
|
||||
|
||||
descriptionLabel.setText(MultiplayerHelpers.buildDescriptionText(multiplayerGame))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user