Disallow creating "multiplayer" games with only AI and spectator

This commit is contained in:
yairm210 2024-04-14 23:58:24 +03:00
parent 62259d977d
commit 0dbc9b0bce

View File

@ -148,9 +148,8 @@ class NewGameScreen(
if (gameSetupInfo.gameParameters.players.none {
it.playerType == PlayerType.Human &&
// do not allow multiplayer with only remote spectator(s) and AI(s) - non-MP that works
!(it.chosenCiv == Constants.spectator && gameSetupInfo.gameParameters.isOnlineMultiplayer &&
it.playerId != UncivGame.Current.settings.multiplayer.userId)
// do not allow multiplayer with only spectator(s) and AI(s) - non-MP that works
!(it.chosenCiv == Constants.spectator && gameSetupInfo.gameParameters.isOnlineMultiplayer)
}) {
val noHumanPlayersPopup = Popup(this)
noHumanPlayersPopup.addGoodSizedLabel("No human players selected!".tr()).row()