add ColorRamp type; change everything to use it; maps not yet upgraded

This commit is contained in:
Chris Forbes
2011-01-08 17:10:00 +13:00
parent e2ff40dc7f
commit 3426b52247
22 changed files with 163 additions and 124 deletions

View File

@@ -45,7 +45,7 @@ namespace OpenRA.Network
{
var player = world != null ? world.FindPlayerByClient(client) : null;
var suffix = (player != null && player.WinState == WinState.Lost) ? " (Dead)" : "";
Game.AddChatLine(client.Color1, client.Name + suffix, order.TargetString);
Game.AddChatLine(client.ColorRamp.GetColor(1), client.Name + suffix, order.TargetString);
}
else
Game.AddChatLine(Color.White, "(player {0})".F(clientId), order.TargetString);
@@ -69,7 +69,7 @@ namespace OpenRA.Network
if (world == null)
{
if (client.Team == orderManager.LocalClient.Team)
Game.AddChatLine(client.Color1, client.Name + " (Team)",
Game.AddChatLine(client.ColorRamp.GetColor(1), client.Name + " (Team)",
order.TargetString);
}
else
@@ -86,7 +86,7 @@ namespace OpenRA.Network
var suffix = (player != null && player.WinState == WinState.Lost)
? " (Dead)"
: " (Team)";
Game.AddChatLine(client.Color1, client.Name + suffix, order.TargetString);
Game.AddChatLine(client.ColorRamp.GetColor(1), client.Name + suffix, order.TargetString);
}
}
}
@@ -110,8 +110,7 @@ namespace OpenRA.Network
var info = new Session.Client()
{
Name = Game.Settings.Player.Name,
Color1 = Game.Settings.Player.Color1,
Color2 = Game.Settings.Player.Color2,
ColorRamp = Game.Settings.Player.ColorRamp,
Country = "random",
SpawnPoint = 0,
Team = 0,