From b722a62454f269f85b0c7542269d0dd2eca4eb80 Mon Sep 17 00:00:00 2001 From: yairm210 Date: Wed, 18 Sep 2024 14:11:45 +0300 Subject: [PATCH] Resolved #12230 - MP game with invalid preview cannot be joined --- .../ui/screens/multiplayerscreens/MultiplayerScreen.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/com/unciv/ui/screens/multiplayerscreens/MultiplayerScreen.kt b/core/src/com/unciv/ui/screens/multiplayerscreens/MultiplayerScreen.kt index dd4033e48c..14ab845acb 100644 --- a/core/src/com/unciv/ui/screens/multiplayerscreens/MultiplayerScreen.kt +++ b/core/src/com/unciv/ui/screens/multiplayerscreens/MultiplayerScreen.kt @@ -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)) } }