diff --git a/OpenRA.Mods.RA/Effects/NukeLaunch.cs b/OpenRA.Mods.RA/Effects/NukeLaunch.cs index c1e13f642d..d17275b253 100755 --- a/OpenRA.Mods.RA/Effects/NukeLaunch.cs +++ b/OpenRA.Mods.RA/Effects/NukeLaunch.cs @@ -9,6 +9,7 @@ #endregion using System.Collections.Generic; +using System.Linq; using OpenRA.Effects; using OpenRA.Graphics; using OpenRA.Traits; @@ -33,6 +34,9 @@ namespace OpenRA.Mods.RA.Effects anim.PlayRepeating("up"); pos = launchPos; + var weaponRules = Rules.Weapons[weapon.ToLowerInvariant()]; + if (weaponRules.Report != null && weaponRules.Report.Any()) + Sound.Play(weaponRules.Report.Random(firedBy.World.SharedRandom), pos); if (silo == null) StartDescent(firedBy.World); } diff --git a/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs b/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs index a1a47531b8..be55c46731 100755 --- a/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs +++ b/OpenRA.Mods.RA/SupportPowers/AirstrikePower.cs @@ -30,12 +30,19 @@ namespace OpenRA.Mods.RA class AirstrikePower : SupportPower { public AirstrikePower(Actor self, AirstrikePowerInfo info) : base(self, info) { } + public override void Activate(Actor self, Order order) { var startPos = self.World.ChooseRandomEdgeCell(); self.World.AddFrameEndTask(w => { var info = (Info as AirstrikePowerInfo); + + if (self.Owner.IsAlliedWith(self.World.RenderPlayer)) + Sound.Play(Info.LaunchSound); + else + Sound.Play(Info.IncomingSound); + var flare = info.FlareType != null ? w.CreateActor(info.FlareType, new TypeDictionary { new LocationInit( order.TargetLocation ), diff --git a/OpenRA.Mods.RA/SupportPowers/NukePower.cs b/OpenRA.Mods.RA/SupportPowers/NukePower.cs index 5e7d88b5fc..230f303909 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.IsAlliedWith(self.World.RenderPlayer)) 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/OpenRA.Mods.RA/Widgets/ObserverProductionIconsWidget.cs b/OpenRA.Mods.RA/Widgets/ObserverProductionIconsWidget.cs index 2b8bde5610..5526ad357d 100644 --- a/OpenRA.Mods.RA/Widgets/ObserverProductionIconsWidget.cs +++ b/OpenRA.Mods.RA/Widgets/ObserverProductionIconsWidget.cs @@ -62,18 +62,20 @@ namespace OpenRA.Mods.RA.Widgets } foreach (var queue in queues) { - var item = queue.Trait.AllItems().FirstOrDefault(); - if (item == null) + var current = queue.Trait.CurrentItem(); + if (current == null) continue; - var icon = new Animation(RenderSimple.GetImage(item)); - icon.Play(item.Traits.Get().Icon); + + var actor = queue.Trait.AllItems().Where(a => a.Name == current.Item).FirstOrDefault(); + if (actor == null) + continue; + + var icon = new Animation(RenderSimple.GetImage(actor)); + icon.Play(actor.Traits.Get().Icon); var size = icon.Image.size / new float2(2, 2); var location = new float2(RenderBounds.Location) + new float2(queue.i * (int)size.Length, 0); WidgetUtils.DrawSHP(icon.Image, location, worldRenderer, size); - var current = queue.Trait.CurrentItem(); - if (current == null) - continue; var clock = clocks[queue.Trait]; clock.PlayFetchIndex("idle", () => current.TotalTime == 0 ? 0 : ((current.TotalTime - current.RemainingTime) diff --git a/mods/cnc/bits/enemya.aud b/mods/cnc/bits/enemya.aud new file mode 100644 index 0000000000..c1bb01bbe6 Binary files /dev/null and b/mods/cnc/bits/enemya.aud differ diff --git a/mods/cnc/rules/structures.yaml b/mods/cnc/rules/structures.yaml index 1f71570662..976fe41ef7 100644 --- a/mods/cnc/rules/structures.yaml +++ b/mods/cnc/rules/structures.yaml @@ -379,6 +379,7 @@ HQ: LongDesc: Deploy an aerial napalm strike.\nBurns buildings and infantry along a line. EndChargeSound: airredy1.aud SelectTargetSound: select1.aud + IncomingSound: enemya.aud UnitType: a10 SupportPowerChargeBar: @@ -473,10 +474,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/cnc/sequences/aircraft.yaml b/mods/cnc/sequences/aircraft.yaml index ce1e5e54a0..e85b0ac724 100644 --- a/mods/cnc/sequences/aircraft.yaml +++ b/mods/cnc/sequences/aircraft.yaml @@ -2,7 +2,7 @@ c17: idle: Start: 0 Facings: 32 - icon: c17iconh + icon: c17icnh Start: 0 tran: diff --git a/mods/cnc/weapons.yaml b/mods/cnc/weapons.yaml index 1b71fb0e1f..b2f26bf407 100644 --- a/mods/cnc/weapons.yaml +++ b/mods/cnc/weapons.yaml @@ -60,6 +60,7 @@ GrenadierExplode: ImpactSound: xplosml2.aud Atomic: + Report: nukemisl.aud Warhead@impact: Damage: 1000 Spread: 6 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/maps/bomber-john/map.yaml b/mods/ra/maps/bomber-john/map.yaml index 2addf941f1..3784205e34 100644 --- a/mods/ra/maps/bomber-john/map.yaml +++ b/mods/ra/maps/bomber-john/map.yaml @@ -819,7 +819,6 @@ Rules: Cost: 800 Tooltip: Name: Bomber - Icon: MNLYICON Description: Lays mines to destroy unwary enemy units.\n Unarmed Health: HP: 500 @@ -858,7 +857,7 @@ Rules: Period: 150 Amount: 30 ChronoshiftPower: - Image: warpicon + Icon: chrono ChargeTime: 60 Description: Chronoshift LongDesc: Teleport a group of vehicles across\nthe map. @@ -869,7 +868,7 @@ Rules: KillCargo: yes Range: 3 IronCurtainPower: - Image: infxicon + Icon: invuln ChargeTime: 30 Description: Invulnerability LongDesc: Makes a unit invulnerable\nfor 3 seconds. @@ -889,7 +888,6 @@ Rules: Buildable: Queue: Building BuildPaletteOrder: 30 - #Prerequisites: MNLYR Owner: allies, soviet Hotkey: b Valued: @@ -902,7 +900,6 @@ Rules: BelowUnits: Tooltip: Name: Bomb - Icon: jmin Description: Bomb (Hotkey B) ProximityCaptor: Types: Mine @@ -917,6 +914,7 @@ Rules: AttackFrontal: Explodes: DemoTruck: + BodyOrientation: T17: Health: @@ -932,7 +930,7 @@ Rules: Tooltip: Name: Tree ChronoshiftPower: - Image: warpicon + Icon: chrono ChargeTime: 60 Description: Chronoshift LongDesc: Teleport a group of vehicles across\nthe map. @@ -943,7 +941,7 @@ Rules: KillCargo: yes Range: 3 IronCurtainPower: - Image: infxicon + Icon: invuln ChargeTime: 30 Description: Invulnerability LongDesc: Makes a unit invulnerable\nfor 3 seconds. @@ -964,6 +962,12 @@ Sequences: damaged-build: Start: 1 Length: * + icon: jmin + Start: 0 + + mnlyr: + icon mnlyicon + brick: idle: Start: 0 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 diff --git a/mods/ra/rules/system.yaml b/mods/ra/rules/system.yaml index ad40e94225..f0b7cdf6d4 100644 --- a/mods/ra/rules/system.yaml +++ b/mods/ra/rules/system.yaml @@ -704,7 +704,6 @@ MINP: Palette: Tooltip: Name: Anti-Personnel Mine - Icon: jmin ProximityCaptor: Types: Mine TargetableUnit: @@ -730,7 +729,6 @@ MINV: Palette: Tooltip: Name: Anti-Tank Mine - Icon: jmin ProximityCaptor: Types: Mine TargetableUnit: @@ -827,7 +825,7 @@ FLARE: powerproxy.parabombs: AirstrikePower: - Image: pbmbicon + Icon: parabombs Description: Parabombs (Single Use) LongDesc: A Badger drops a load of parachuted\nbombs on your target. OneShot: yes @@ -838,7 +836,7 @@ powerproxy.parabombs: powerproxy.sonarpulse: SonarPulsePower: - Image: sonricon + Icon: sonar Description: Sonar Pulse (Single Use) LongDesc: Reveals all submarines on the map for a \nshort time. AllowMultiple: yes diff --git a/mods/ra/sequences/misc.yaml b/mods/ra/sequences/misc.yaml index 3b34749e0f..7356ac63bd 100644 --- a/mods/ra/sequences/misc.yaml +++ b/mods/ra/sequences/misc.yaml @@ -410,3 +410,15 @@ icon: Start: 0 gps: gpssicon Start: 0 + parabombs: pbmbicon + Start: 0 + sonar: sonricon + Start: 0 + +minp: + icon: jmin + Start: 0 + +minv: + icon: jmin + Start: 0 \ No newline at end of file