diff --git a/OpenRA.Mods.Cnc/Traits/Infiltration/InfiltrateForSupportPowerReset.cs b/OpenRA.Mods.Cnc/Traits/Infiltration/InfiltrateForSupportPowerReset.cs index ff35424cb2..6eeb399c31 100644 --- a/OpenRA.Mods.Cnc/Traits/Infiltration/InfiltrateForSupportPowerReset.cs +++ b/OpenRA.Mods.Cnc/Traits/Infiltration/InfiltrateForSupportPowerReset.cs @@ -21,6 +21,14 @@ namespace OpenRA.Mods.Cnc.Traits [Desc("The `TargetTypes` from `Targetable` that are allowed to enter.")] public readonly BitSet Types = default(BitSet); + [NotificationReference("Speech")] + [Desc("Sound the victim will hear when technology gets stolen.")] + public readonly string InfiltratedNotification = null; + + [NotificationReference("Speech")] + [Desc("Sound the perpetrator will hear after successful infiltration.")] + public readonly string InfiltrationNotification = null; + public object Create(ActorInitializer init) { return new InfiltrateForSupportPowerReset(this); } } @@ -38,6 +46,12 @@ namespace OpenRA.Mods.Cnc.Traits if (!info.Types.Overlaps(types)) return; + if (info.InfiltratedNotification != null) + Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", info.InfiltratedNotification, self.Owner.Faction.InternalName); + + if (info.InfiltrationNotification != null) + Game.Sound.PlayNotification(self.World.Map.Rules, infiltrator.Owner, "Speech", info.InfiltrationNotification, infiltrator.Owner.Faction.InternalName); + var manager = self.Owner.PlayerActor.Trait(); var powers = manager.GetPowersForActor(self).Where(sp => !sp.Disabled); foreach (var power in powers)