System messages should be yellow to distinguish them from normal
This commit is contained in:
@@ -40,7 +40,7 @@ namespace OpenRA.Network
|
||||
{
|
||||
// Server message
|
||||
case "Message":
|
||||
Game.AddChatLine(Color.White, ServerChatName, order.TargetString);
|
||||
Game.AddSystemLine(ServerChatName, order.TargetString);
|
||||
break;
|
||||
|
||||
// Reports that the target player disconnected
|
||||
@@ -73,7 +73,7 @@ namespace OpenRA.Network
|
||||
if (orderManager.LocalClient != null && client != orderManager.LocalClient && client.Team > 0 && client.Team == orderManager.LocalClient.Team)
|
||||
suffix += " (Ally)";
|
||||
|
||||
Game.AddChatLine(client.Color, client.Name + suffix, message);
|
||||
Game.AddChatLine(client.Name + suffix, client.Color, message);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace OpenRA.Network
|
||||
{
|
||||
var prefix = order.ExtraData == uint.MaxValue ? "[Spectators] " : "[Team] ";
|
||||
if (orderManager.LocalClient != null && client.Team == orderManager.LocalClient.Team)
|
||||
Game.AddChatLine(client.Color, prefix + client.Name, message);
|
||||
Game.AddChatLine(prefix + client.Name, client.Color, message);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ namespace OpenRA.Network
|
||||
{
|
||||
// Validate before adding the line
|
||||
if (client.IsObserver || (player != null && player.WinState != WinState.Undefined))
|
||||
Game.AddChatLine(client.Color, "[Spectators] " + client.Name, message);
|
||||
Game.AddChatLine("[Spectators] " + client.Name, client.Color, message);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -108,7 +108,7 @@ namespace OpenRA.Network
|
||||
&& world.LocalPlayer.WinState == WinState.Undefined;
|
||||
|
||||
if (valid && (isSameTeam || world.IsReplay))
|
||||
Game.AddChatLine(client.Color, "[Team" + (world.IsReplay ? " " + order.ExtraData : "") + "] " + client.Name, message);
|
||||
Game.AddChatLine("[Team" + (world.IsReplay ? " " + order.ExtraData : "") + "] " + client.Name, client.Color, message);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -138,7 +138,7 @@ namespace OpenRA.Network
|
||||
FieldLoader.GetValue<int>("SaveSyncFrame", saveSyncFrame.Value.Value);
|
||||
}
|
||||
else
|
||||
Game.AddChatLine(Color.White, ServerChatName, "The game has started.");
|
||||
Game.AddSystemLine(ServerChatName, "The game has started.");
|
||||
|
||||
Game.StartGame(orderManager.LobbyInfo.GlobalSettings.Map, WorldType.Regular);
|
||||
break;
|
||||
@@ -157,7 +157,7 @@ namespace OpenRA.Network
|
||||
|
||||
case "GameSaved":
|
||||
if (!orderManager.World.IsReplay)
|
||||
Game.AddChatLine(Color.White, ServerChatName, "Game saved");
|
||||
Game.AddSystemLine(ServerChatName, "Game saved");
|
||||
|
||||
foreach (var nsr in orderManager.World.WorldActor.TraitsImplementing<INotifyGameSaved>())
|
||||
nsr.GameSaved(orderManager.World);
|
||||
@@ -177,7 +177,7 @@ namespace OpenRA.Network
|
||||
if (orderManager.World.Paused != pause && world != null && world.LobbyInfo.NonBotClients.Count() > 1)
|
||||
{
|
||||
var pausetext = "The game is {0} by {1}".F(pause ? "paused" : "un-paused", client.Name);
|
||||
Game.AddChatLine(Color.White, ServerChatName, pausetext);
|
||||
Game.AddSystemLine(ServerChatName, pausetext);
|
||||
}
|
||||
|
||||
orderManager.World.Paused = pause;
|
||||
|
||||
Reference in New Issue
Block a user