Add localisation support to transient lines.
This commit is contained in:
committed by
Gustas
parent
43d1a20d8c
commit
1899eed839
@@ -78,7 +78,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
enterHut?.Repair(self);
|
||||
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", speechNotification, self.Owner.Faction.InternalName);
|
||||
TextNotificationsManager.AddTransientLine(textNotification, self.Owner);
|
||||
TextNotificationsManager.AddTransientLine(self.Owner, textNotification);
|
||||
|
||||
if (enterBehaviour == EnterBehaviour.Dispose)
|
||||
self.Dispose();
|
||||
|
||||
@@ -271,7 +271,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
host.Actor.Owner.PlayerActor.TraitOrDefault<PlayerExperience>()?.GiveExperience(repairsUnits.Info.PlayerExperience);
|
||||
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", repairsUnits.Info.FinishRepairingNotification, self.Owner.Faction.InternalName);
|
||||
TextNotificationsManager.AddTransientLine(repairsUnits.Info.FinishRepairingTextNotification, self.Owner);
|
||||
TextNotificationsManager.AddTransientLine(self.Owner, repairsUnits.Info.FinishRepairingTextNotification);
|
||||
|
||||
activeResupplyTypes &= ~ResupplyType.Repair;
|
||||
return;
|
||||
@@ -289,7 +289,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
{
|
||||
played = true;
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", repairsUnits.Info.StartRepairingNotification, self.Owner.Faction.InternalName);
|
||||
TextNotificationsManager.AddTransientLine(repairsUnits.Info.StartRepairingTextNotification, self.Owner);
|
||||
TextNotificationsManager.AddTransientLine(self.Owner, repairsUnits.Info.StartRepairingTextNotification);
|
||||
}
|
||||
|
||||
if (!playerResources.TakeCash(cost, true))
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
self.World.AddFrameEndTask(w => w.Add(new FloatingText(self.CenterPosition, self.Owner.Color, FloatingText.FormatCashTick(refund), 30)));
|
||||
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", sellableInfo.Notification, self.Owner.Faction.InternalName);
|
||||
TextNotificationsManager.AddTransientLine(sellableInfo.TextNotification, self.Owner);
|
||||
TextNotificationsManager.AddTransientLine(self.Owner, sellableInfo.TextNotification);
|
||||
|
||||
self.Dispose();
|
||||
return false;
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
Game.Sound.PlayToPlayer(SoundType.World, self.Owner, s, self.CenterPosition);
|
||||
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", Notification, self.Owner.Faction.InternalName);
|
||||
TextNotificationsManager.AddTransientLine(TextNotification, self.Owner);
|
||||
TextNotificationsManager.AddTransientLine(self.Owner, TextNotification);
|
||||
|
||||
var init = new TypeDictionary
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user