From d8b0c0d440699e506b35eeff6575913b7bb0b9be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sun, 18 Aug 2013 19:34:08 +0200 Subject: [PATCH] added support for nuke launch sound to confirm strike separated into IncomingSound = "nuke approaching/detected" and changed LaunchSound into "nuke lauched" also nuke with small L .aud in cnc rules looks like a typo --- OpenRA.Mods.RA/SupportPowers/NukePower.cs | 5 +++-- OpenRA.Mods.RA/SupportPowers/SupportPower.cs | 1 + mods/cnc/rules/structures.yaml | 5 +++-- mods/d2k/rules/harkonnen.yaml | 3 ++- mods/ra/rules/structures.yaml | 3 ++- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/OpenRA.Mods.RA/SupportPowers/NukePower.cs b/OpenRA.Mods.RA/SupportPowers/NukePower.cs index 5e7d88b5fc..d6565923c6 100755 --- a/OpenRA.Mods.RA/SupportPowers/NukePower.cs +++ b/OpenRA.Mods.RA/SupportPowers/NukePower.cs @@ -41,9 +41,10 @@ namespace OpenRA.Mods.RA public override void Activate(Actor self, Order order) { - // Play to everyone but the current player - if (self.Owner != self.World.LocalPlayer) + if (self.Owner == self.World.LocalPlayer) Sound.Play(Info.LaunchSound); + else + Sound.Play(Info.IncomingSound); var npi = Info as NukePowerInfo; var rb = self.Trait(); diff --git a/OpenRA.Mods.RA/SupportPowers/SupportPower.cs b/OpenRA.Mods.RA/SupportPowers/SupportPower.cs index 2580a5769f..158987c405 100755 --- a/OpenRA.Mods.RA/SupportPowers/SupportPower.cs +++ b/OpenRA.Mods.RA/SupportPowers/SupportPower.cs @@ -27,6 +27,7 @@ namespace OpenRA.Mods.RA public readonly string EndChargeSound = null; public readonly string SelectTargetSound = null; public readonly string LaunchSound = null; + public readonly string IncomingSound = null; public readonly bool DisplayTimer = false; diff --git a/mods/cnc/rules/structures.yaml b/mods/cnc/rules/structures.yaml index 1f71570662..9553c0579f 100644 --- a/mods/cnc/rules/structures.yaml +++ b/mods/cnc/rules/structures.yaml @@ -473,10 +473,11 @@ TMPL: ChargeTime: 300 Description: Nuclear Strike LongDesc: Launch a tactical nuke.\nApplies heavy damage over a large area. - BeginChargeSound: + BeginChargeSound: EndChargeSound: nukavail.aud SelectTargetSound: select1.aud - LaunchSound: nukel.aud + LaunchSound: nuklnch1.aud + IncomingSound: nuke1.aud MissileWeapon: atomic SupportPowerChargeBar: diff --git a/mods/d2k/rules/harkonnen.yaml b/mods/d2k/rules/harkonnen.yaml index 87eea48b08..5d3699d175 100644 --- a/mods/d2k/rules/harkonnen.yaml +++ b/mods/d2k/rules/harkonnen.yaml @@ -86,8 +86,9 @@ PALACEH: LongDesc: Launches a nuclear missile at a target location BeginChargeSound: HI_PREP.AUD EndChargeSound: HI_DHRDY.AUD - SelectTargetSound: + SelectTargetSound: LaunchSound: + IncomingSound: MissileWeapon: atomic SpawnOffset:-512,1c171,0 CanPowerDown: diff --git a/mods/ra/rules/structures.yaml b/mods/ra/rules/structures.yaml index 63e7951f0d..8411a739c7 100644 --- a/mods/ra/rules/structures.yaml +++ b/mods/ra/rules/structures.yaml @@ -31,7 +31,8 @@ MSLO: BeginChargeSound: aprep1.aud EndChargeSound: aready1.aud SelectTargetSound: slcttgt1.aud - LaunchSound: alaunch1.aud + IncomingSound: alaunch1.aud + LaunchSound: MissileWeapon: atomic SpawnOffset: 0,427,0 DisplayTimer: True