Disallow starting a game without players

This commit is contained in:
abcdefg30
2022-06-26 13:13:02 +02:00
committed by Matthias Mailänder
parent ea72c50fb4
commit ee3c54b572
3 changed files with 15 additions and 0 deletions

View File

@@ -383,6 +383,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{
startGameButton.IsDisabled = () => configurationDisabled() || map.Status != MapStatus.Available ||
orderManager.LobbyInfo.Slots.Any(sl => sl.Value.Required && orderManager.LobbyInfo.ClientInSlot(sl.Key) == null) ||
orderManager.LobbyInfo.Slots.All(sl => orderManager.LobbyInfo.ClientInSlot(sl.Key) == null) ||
(!orderManager.LobbyInfo.GlobalSettings.EnableSingleplayer && orderManager.LobbyInfo.NonBotPlayers.Count() < 2) ||
insufficientPlayerSpawns;