Minor code (style) cleanup
This commit is contained in:
@@ -76,8 +76,7 @@ namespace OpenRA.Network
|
|||||||
if (world == null)
|
if (world == null)
|
||||||
{
|
{
|
||||||
if (orderManager.LocalClient != null && client.Team == orderManager.LocalClient.Team)
|
if (orderManager.LocalClient != null && client.Team == orderManager.LocalClient.Team)
|
||||||
Game.AddChatLine(client.Color.RGB, client.Name + " (Team)",
|
Game.AddChatLine(client.Color.RGB, client.Name + " (Team)", order.TargetString);
|
||||||
order.TargetString);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -71,15 +71,16 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
{
|
{
|
||||||
var team = teamChat && !disableTeamChat;
|
var team = teamChat && !disableTeamChat;
|
||||||
if (chatText.Text != "")
|
if (chatText.Text != "")
|
||||||
|
{
|
||||||
if (!chatText.Text.StartsWith("/"))
|
if (!chatText.Text.StartsWith("/"))
|
||||||
orderManager.IssueOrder(Order.Chat(team, chatText.Text.Trim()));
|
orderManager.IssueOrder(Order.Chat(team, chatText.Text.Trim()));
|
||||||
else
|
else if (chatTraits != null)
|
||||||
if (chatTraits != null)
|
{
|
||||||
{
|
var text = chatText.Text.Trim();
|
||||||
var text = chatText.Text.Trim();
|
foreach (var trait in chatTraits)
|
||||||
foreach (var trait in chatTraits)
|
trait.OnChat(orderManager.LocalClient.Name, text);
|
||||||
trait.OnChat(orderManager.LocalClient.Name, text);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
chatText.Text = "";
|
chatText.Text = "";
|
||||||
CloseChat();
|
CloseChat();
|
||||||
|
|||||||
Reference in New Issue
Block a user