Merge pull request #10670 from RockyTV/rockytv
Disable 1 human versus bots games
This commit is contained in:
@@ -196,6 +196,7 @@ namespace OpenRA.Network
|
||||
public bool ShortGame = true;
|
||||
public bool AllowVersionMismatch;
|
||||
public string GameUid;
|
||||
public bool DisableSingleplayer;
|
||||
|
||||
public static Global Deserialize(MiniYaml data)
|
||||
{
|
||||
|
||||
@@ -148,7 +148,8 @@ namespace OpenRA.Server
|
||||
RandomSeed = randomSeed,
|
||||
Map = settings.Map,
|
||||
ServerName = settings.Name,
|
||||
Dedicated = settings.Dedicated
|
||||
Dedicated = settings.Dedicated,
|
||||
DisableSingleplayer = settings.DisableSinglePlayer,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -395,8 +396,8 @@ namespace OpenRA.Server
|
||||
if (Map.RuleDefinitions.Any() && !LobbyInfo.IsSinglePlayer)
|
||||
SendOrderTo(newConn, "Message", "This map contains custom rules. Game experience may change.");
|
||||
|
||||
if (Settings.LockBots)
|
||||
SendOrderTo(newConn, "Message", "Bots have been disabled on this server.");
|
||||
if (Settings.DisableSinglePlayer)
|
||||
SendOrderTo(newConn, "Message", "Singleplayer games have been disabled on this server.");
|
||||
else if (MapPlayers.Players.Where(p => p.Value.Playable).All(p => !p.Value.AllowBots))
|
||||
SendOrderTo(newConn, "Message", "Bots have been disabled on this map.");
|
||||
|
||||
|
||||
@@ -70,8 +70,8 @@ namespace OpenRA
|
||||
[Desc("Automatically restart when a game ends. Disable this when something else already takes care about it.")]
|
||||
public bool DedicatedLoop = true;
|
||||
|
||||
[Desc("Disallow AI bots.")]
|
||||
public bool LockBots = false;
|
||||
[Desc("Disallow games where only one player plays with bots.")]
|
||||
public bool DisableSinglePlayer = false;
|
||||
|
||||
public string TimestampFormat = "s";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user