Move Text handling to its own class
This commit is contained in:
@@ -99,7 +99,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (info.SuppressNotifications)
|
||||
return;
|
||||
|
||||
Game.AddSystemLine(player.PlayerName + " is defeated.");
|
||||
TextNotificationsManager.AddSystemLine(player.PlayerName + " is defeated.");
|
||||
Game.RunAfterDelay(info.NotificationDelay, () =>
|
||||
{
|
||||
if (Game.IsCurrentWorld(player.World) && player == player.World.LocalPlayer)
|
||||
@@ -112,7 +112,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (info.SuppressNotifications)
|
||||
return;
|
||||
|
||||
Game.AddSystemLine(player.PlayerName + " is victorious.");
|
||||
TextNotificationsManager.AddSystemLine(player.PlayerName + " is victorious.");
|
||||
Game.RunAfterDelay(info.NotificationDelay, () =>
|
||||
{
|
||||
if (Game.IsCurrentWorld(player.World) && player == player.World.LocalPlayer)
|
||||
|
||||
@@ -273,7 +273,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return;
|
||||
}
|
||||
|
||||
Game.Debug("Cheat used: {0} by {1}{2}", order.OrderString, self.Owner.PlayerName, debugSuffix);
|
||||
TextNotificationsManager.Debug("Cheat used: {0} by {1}{2}", order.OrderString, self.Owner.PlayerName, debugSuffix);
|
||||
}
|
||||
|
||||
bool IUnlocksRenderPlayer.RenderPlayerUnlocked => Enabled;
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (info.SuppressNotifications)
|
||||
return;
|
||||
|
||||
Game.AddSystemLine(player.PlayerName + " is defeated.");
|
||||
TextNotificationsManager.AddSystemLine(player.PlayerName + " is defeated.");
|
||||
Game.RunAfterDelay(info.NotificationDelay, () =>
|
||||
{
|
||||
if (Game.IsCurrentWorld(player.World) && player == player.World.LocalPlayer)
|
||||
@@ -150,7 +150,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (info.SuppressNotifications)
|
||||
return;
|
||||
|
||||
Game.AddSystemLine(player.PlayerName + " is victorious.");
|
||||
TextNotificationsManager.AddSystemLine(player.PlayerName + " is victorious.");
|
||||
Game.RunAfterDelay(info.NotificationDelay, () =>
|
||||
{
|
||||
if (Game.IsCurrentWorld(player.World) && player == player.World.LocalPlayer)
|
||||
|
||||
@@ -158,7 +158,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
if (ticksRemaining == m * 60 * ticksPerSecond)
|
||||
{
|
||||
Game.AddSystemLine(Notification.F(m, m > 1 ? "s" : null));
|
||||
TextNotificationsManager.AddSystemLine(Notification.F(m, m > 1 ? "s" : null));
|
||||
|
||||
var faction = self.World.LocalPlayer == null ? null : self.World.LocalPlayer.Faction.InternalName;
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.World.LocalPlayer, "Speech", info.TimeLimitWarnings[m], faction);
|
||||
@@ -172,7 +172,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
countdownLabel.GetText = () => null;
|
||||
|
||||
if (!info.SkipTimerExpiredNotification)
|
||||
Game.AddSystemLine("Time limit has expired.");
|
||||
TextNotificationsManager.AddSystemLine("Time limit has expired.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user