Add support for transient text notifications matching speech notifications
This commit is contained in:
committed by
Paul Chote
parent
9f723be65a
commit
24b9482cc1
@@ -18,17 +18,19 @@ namespace OpenRA.Mods.Common.Activities
|
||||
class RepairBridge : Enter
|
||||
{
|
||||
readonly EnterBehaviour enterBehaviour;
|
||||
readonly string notification;
|
||||
readonly string speechNotification;
|
||||
readonly string textNotification;
|
||||
|
||||
Actor enterActor;
|
||||
BridgeHut enterHut;
|
||||
LegacyBridgeHut enterLegacyHut;
|
||||
|
||||
public RepairBridge(Actor self, in Target target, EnterBehaviour enterBehaviour, string notification, Color targetLineColor)
|
||||
public RepairBridge(Actor self, in Target target, EnterBehaviour enterBehaviour, string speechNotification, string textNotification, Color targetLineColor)
|
||||
: base(self, target, targetLineColor)
|
||||
{
|
||||
this.enterBehaviour = enterBehaviour;
|
||||
this.notification = notification;
|
||||
this.speechNotification = speechNotification;
|
||||
this.textNotification = textNotification;
|
||||
}
|
||||
|
||||
bool CanEnterHut()
|
||||
@@ -75,7 +77,8 @@ namespace OpenRA.Mods.Common.Activities
|
||||
else if (enterHut != null)
|
||||
enterHut.Repair(self);
|
||||
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", notification, self.Owner.Faction.InternalName);
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", speechNotification, self.Owner.Faction.InternalName);
|
||||
TextNotificationsManager.AddTransientLine(textNotification, self.Owner);
|
||||
|
||||
if (enterBehaviour == EnterBehaviour.Dispose)
|
||||
self.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user