Add support for transient text notifications matching speech notifications
This commit is contained in:
committed by
Paul Chote
parent
9f723be65a
commit
24b9482cc1
@@ -82,6 +82,9 @@ namespace OpenRA.Mods.D2k.Activities
|
||||
foreach (var player in affectedPlayers)
|
||||
self.World.AddFrameEndTask(w => w.Add(new MapNotificationEffect(player, "Speech", swallow.Info.WormAttackNotification, 25, true, attackPosition, Color.Red)));
|
||||
|
||||
if (affectedPlayers.Contains(self.World.LocalPlayer))
|
||||
TextNotificationsManager.AddTransientLine(swallow.Info.WormAttackTextNotification, self.World.LocalPlayer);
|
||||
|
||||
var barrel = armament.CheckFire(self, facing, target);
|
||||
if (barrel == null)
|
||||
return false;
|
||||
|
||||
@@ -38,6 +38,8 @@ namespace OpenRA.Mods.D2k.Traits
|
||||
[NotificationReference("Speech")]
|
||||
public readonly string WormAttackNotification = "WormAttack";
|
||||
|
||||
public readonly string WormAttackTextNotification = "Worm attack.";
|
||||
|
||||
public override object Create(ActorInitializer init) { return new AttackSwallow(init.Self, this); }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user