Color picker update with team color presets. Bots added will use available team color presets by default

This commit is contained in:
David Wilson
2018-02-25 12:09:53 +10:00
committed by Paul Chote
parent b383b9abc9
commit 9bc9ce4577
12 changed files with 534 additions and 95 deletions

View File

@@ -321,7 +321,7 @@ namespace OpenRA.Mods.Common.Server
var terrainColors = tileset.TerrainInfo.Where(ti => ti.RestrictPlayerColor).Select(ti => ti.Color);
var playerColors = server.LobbyInfo.Clients.Select(c => c.Color.RGB)
.Concat(server.Map.Players.Players.Values.Select(p => p.Color.RGB));
bot.Color = bot.PreferredColor = validator.RandomValidColor(server.Random, terrainColors, playerColors);
bot.Color = bot.PreferredColor = validator.RandomPresetColor(server.Random, terrainColors, playerColors);
server.LobbyInfo.Clients.Add(bot);
}