Add localisation support to transient lines.
This commit is contained in:
committed by
Gustas
parent
43d1a20d8c
commit
1899eed839
@@ -166,7 +166,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
Game.Sound.Play(SoundType.UI, Info.DetectedSound);
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, player, "Speech", info.DetectedSpeechNotification, player.Faction.InternalName);
|
||||
TextNotificationsManager.AddTransientLine(info.DetectedTextNotification, player);
|
||||
TextNotificationsManager.AddTransientLine(player, info.DetectedTextNotification);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech",
|
||||
Info.BeginChargeSpeechNotification, self.Owner.Faction.InternalName);
|
||||
|
||||
TextNotificationsManager.AddTransientLine(Info.BeginChargeTextNotification, self.Owner);
|
||||
TextNotificationsManager.AddTransientLine(self.Owner, Info.BeginChargeTextNotification);
|
||||
}
|
||||
|
||||
public virtual void Charged(Actor self, string key)
|
||||
@@ -190,7 +190,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech",
|
||||
Info.EndChargeSpeechNotification, self.Owner.Faction.InternalName);
|
||||
|
||||
TextNotificationsManager.AddTransientLine(Info.EndChargeTextNotification, self.Owner);
|
||||
TextNotificationsManager.AddTransientLine(self.Owner, Info.EndChargeTextNotification);
|
||||
|
||||
foreach (var notify in self.TraitsImplementing<INotifySupportPower>())
|
||||
notify.Charged(self);
|
||||
@@ -228,7 +228,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
var speech = isAllied ? Info.LaunchSpeechNotification : Info.IncomingSpeechNotification;
|
||||
Game.Sound.PlayNotification(Self.World.Map.Rules, localPlayer, "Speech", speech, localPlayer.Faction.InternalName);
|
||||
|
||||
TextNotificationsManager.AddTransientLine(isAllied ? Info.LaunchTextNotification : Info.IncomingTextNotification, localPlayer);
|
||||
var text = isAllied ? Info.LaunchTextNotification : Info.IncomingTextNotification;
|
||||
TextNotificationsManager.AddTransientLine(localPlayer, text);
|
||||
}
|
||||
|
||||
public IEnumerable<CPos> CellsMatching(CPos location, char[] footprint, CVec dimensions)
|
||||
|
||||
Reference in New Issue
Block a user