diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/SupportPower.cs b/OpenRA.Mods.Common/Traits/SupportPowers/SupportPower.cs index 8ee86aa42b..7ca610dd0d 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/SupportPower.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/SupportPower.cs @@ -152,6 +152,9 @@ namespace OpenRA.Mods.Common.Traits Game.Sound.PlayToPlayer(SoundType.UI, self.Owner, Info.EndChargeSound); Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", Info.EndChargeSpeechNotification, self.Owner.Faction.InternalName); + + foreach (var notify in self.TraitsImplementing()) + notify.Charged(self); } public virtual void SelectTarget(Actor self, string order, SupportPowerManager manager) @@ -172,6 +175,9 @@ namespace OpenRA.Mods.Common.Traits order.Player.Color, Info.RadarPingDuration); } + + foreach (var notify in self.TraitsImplementing()) + notify.Activated(self); } public virtual void PlayLaunchSounds() diff --git a/OpenRA.Mods.Common/TraitsInterfaces.cs b/OpenRA.Mods.Common/TraitsInterfaces.cs index 1cfc3f27fb..1aebc3cbd1 100644 --- a/OpenRA.Mods.Common/TraitsInterfaces.cs +++ b/OpenRA.Mods.Common/TraitsInterfaces.cs @@ -133,6 +133,7 @@ namespace OpenRA.Mods.Common.Traits [RequireExplicitImplementation] public interface INotifyPowerLevelChanged { void PowerLevelChanged(Actor self); } + public interface INotifySupportPower { void Charged(Actor self); void Activated(Actor self); } public interface INotifyBuildingPlaced { void BuildingPlaced(Actor self); } public interface INotifyNuke { void Launching(Actor self); }