Add a new OnFireSound property to IonCannonPower
This replaces the hacky use of LaunchSound
This commit is contained in:
@@ -43,6 +43,9 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
[Desc("Apply the weapon impact this many ticks into the effect")]
|
[Desc("Apply the weapon impact this many ticks into the effect")]
|
||||||
public readonly int WeaponDelay = 7;
|
public readonly int WeaponDelay = 7;
|
||||||
|
|
||||||
|
[Desc("Sound to instantly play at the targeted area.")]
|
||||||
|
public readonly string OnFireSound = null;
|
||||||
|
|
||||||
public override object Create(ActorInitializer init) { return new IonCannonPower(init.Self, this); }
|
public override object Create(ActorInitializer init) { return new IonCannonPower(init.Self, this); }
|
||||||
public void RulesetLoaded(Ruleset rules, ActorInfo ai) { WeaponInfo = rules.Weapons[Weapon.ToLowerInvariant()]; }
|
public void RulesetLoaded(Ruleset rules, ActorInfo ai) { WeaponInfo = rules.Weapons[Weapon.ToLowerInvariant()]; }
|
||||||
}
|
}
|
||||||
@@ -63,7 +66,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
|
|
||||||
self.World.AddFrameEndTask(w =>
|
self.World.AddFrameEndTask(w =>
|
||||||
{
|
{
|
||||||
Game.Sound.Play(Info.LaunchSound, self.World.Map.CenterOfCell(order.TargetLocation));
|
Game.Sound.Play(Info.LaunchSound);
|
||||||
|
Game.Sound.Play(info.OnFireSound, self.World.Map.CenterOfCell(order.TargetLocation));
|
||||||
w.Add(new IonCannon(self.Owner, info.WeaponInfo, w, self.CenterPosition, order.TargetLocation,
|
w.Add(new IonCannon(self.Owner, info.WeaponInfo, w, self.CenterPosition, order.TargetLocation,
|
||||||
info.Effect, info.EffectSequence, info.EffectPalette, info.WeaponDelay));
|
info.Effect, info.EffectSequence, info.EffectPalette, info.WeaponDelay));
|
||||||
|
|
||||||
|
|||||||
@@ -575,9 +575,9 @@ EYE:
|
|||||||
LongDesc: Initiate an Ion Cannon strike.\nApplies instant damage to a small area.
|
LongDesc: Initiate an Ion Cannon strike.\nApplies instant damage to a small area.
|
||||||
BeginChargeSpeechNotification: IonCannonCharging
|
BeginChargeSpeechNotification: IonCannonCharging
|
||||||
EndChargeSpeechNotification: IonCannonReady
|
EndChargeSpeechNotification: IonCannonReady
|
||||||
LaunchSound: ion1.aud
|
|
||||||
SelectTargetSpeechNotification: SelectTarget
|
SelectTargetSpeechNotification: SelectTarget
|
||||||
InsufficientPowerSpeechNotification: InsufficientPower
|
InsufficientPowerSpeechNotification: InsufficientPower
|
||||||
|
OnFireSound: ion1.aud
|
||||||
DisplayRadarPing: True
|
DisplayRadarPing: True
|
||||||
CameraActor: camera.small
|
CameraActor: camera.small
|
||||||
SupportPowerChargeBar:
|
SupportPowerChargeBar:
|
||||||
|
|||||||
Reference in New Issue
Block a user