Add new interfaces for support powers.
This commit is contained in:
committed by
atlimit8
parent
e42d177920
commit
b3b0aa75ae
@@ -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<INotifySupportPower>())
|
||||
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<INotifySupportPower>())
|
||||
notify.Activated(self);
|
||||
}
|
||||
|
||||
public virtual void PlayLaunchSounds()
|
||||
|
||||
@@ -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); }
|
||||
|
||||
Reference in New Issue
Block a user