Add localisation support to transient lines.

This commit is contained in:
Matthias Mailänder
2023-08-19 12:57:21 +02:00
committed by Gustas
parent 43d1a20d8c
commit 1899eed839
44 changed files with 95 additions and 82 deletions

View File

@@ -51,11 +51,11 @@ namespace OpenRA.Mods.Common.Traits.Sound
{
var faction = info.NewOwnerVoice ? newOwner.Faction.InternalName : oldOwner.Faction.InternalName;
Game.Sound.PlayNotification(self.World.Map.Rules, newOwner, "Speech", info.Notification, faction);
TextNotificationsManager.AddTransientLine(info.TextNotification, newOwner);
TextNotificationsManager.AddTransientLine(newOwner, info.TextNotification);
var loseFaction = info.LoseNewOwnerVoice ? newOwner.Faction.InternalName : oldOwner.Faction.InternalName;
Game.Sound.PlayNotification(self.World.Map.Rules, oldOwner, "Speech", info.LoseNotification, loseFaction);
TextNotificationsManager.AddTransientLine(info.LoseTextNotification, oldOwner);
TextNotificationsManager.AddTransientLine(oldOwner, info.LoseTextNotification);
}
}
}