Add a "structure sold" notification.
This commit is contained in:
committed by
abcdefg30
parent
3b768dacf5
commit
8f06b0a836
@@ -48,6 +48,8 @@ namespace OpenRA.Mods.Common.Activities
|
||||
if (showTicks && refund > 0 && self.Owner.IsAlliedWith(self.World.RenderPlayer))
|
||||
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);
|
||||
|
||||
self.Dispose();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("List of audio clips to play when the actor is being sold.")]
|
||||
public readonly string[] SellSounds = { };
|
||||
|
||||
[NotificationReference("Speech")]
|
||||
[Desc("The audio notification type to play.")]
|
||||
public string Notification = null;
|
||||
|
||||
[Desc("Whether to show the cash tick indicators rising from the actor.")]
|
||||
public readonly bool ShowTicks = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user