Merge pull request #3705 from Mailaender/nuke-sounds
Fixed NukeLaunch sounds and missing icon sequences
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using OpenRA.Effects;
|
using OpenRA.Effects;
|
||||||
using OpenRA.Graphics;
|
using OpenRA.Graphics;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
@@ -33,6 +34,9 @@ namespace OpenRA.Mods.RA.Effects
|
|||||||
anim.PlayRepeating("up");
|
anim.PlayRepeating("up");
|
||||||
|
|
||||||
pos = launchPos;
|
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)
|
if (silo == null)
|
||||||
StartDescent(firedBy.World);
|
StartDescent(firedBy.World);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,12 +30,19 @@ namespace OpenRA.Mods.RA
|
|||||||
class AirstrikePower : SupportPower
|
class AirstrikePower : SupportPower
|
||||||
{
|
{
|
||||||
public AirstrikePower(Actor self, AirstrikePowerInfo info) : base(self, info) { }
|
public AirstrikePower(Actor self, AirstrikePowerInfo info) : base(self, info) { }
|
||||||
|
|
||||||
public override void Activate(Actor self, Order order)
|
public override void Activate(Actor self, Order order)
|
||||||
{
|
{
|
||||||
var startPos = self.World.ChooseRandomEdgeCell();
|
var startPos = self.World.ChooseRandomEdgeCell();
|
||||||
self.World.AddFrameEndTask(w =>
|
self.World.AddFrameEndTask(w =>
|
||||||
{
|
{
|
||||||
var info = (Info as AirstrikePowerInfo);
|
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
|
var flare = info.FlareType != null ? w.CreateActor(info.FlareType, new TypeDictionary
|
||||||
{
|
{
|
||||||
new LocationInit( order.TargetLocation ),
|
new LocationInit( order.TargetLocation ),
|
||||||
|
|||||||
@@ -41,9 +41,10 @@ namespace OpenRA.Mods.RA
|
|||||||
|
|
||||||
public override void Activate(Actor self, Order order)
|
public override void Activate(Actor self, Order order)
|
||||||
{
|
{
|
||||||
// Play to everyone but the current player
|
if (self.Owner.IsAlliedWith(self.World.RenderPlayer))
|
||||||
if (self.Owner != self.World.LocalPlayer)
|
|
||||||
Sound.Play(Info.LaunchSound);
|
Sound.Play(Info.LaunchSound);
|
||||||
|
else
|
||||||
|
Sound.Play(Info.IncomingSound);
|
||||||
|
|
||||||
var npi = Info as NukePowerInfo;
|
var npi = Info as NukePowerInfo;
|
||||||
var rb = self.Trait<RenderSimple>();
|
var rb = self.Trait<RenderSimple>();
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ namespace OpenRA.Mods.RA
|
|||||||
public readonly string EndChargeSound = null;
|
public readonly string EndChargeSound = null;
|
||||||
public readonly string SelectTargetSound = null;
|
public readonly string SelectTargetSound = null;
|
||||||
public readonly string LaunchSound = null;
|
public readonly string LaunchSound = null;
|
||||||
|
public readonly string IncomingSound = null;
|
||||||
|
|
||||||
public readonly bool DisplayTimer = false;
|
public readonly bool DisplayTimer = false;
|
||||||
|
|
||||||
|
|||||||
@@ -62,18 +62,20 @@ namespace OpenRA.Mods.RA.Widgets
|
|||||||
}
|
}
|
||||||
foreach (var queue in queues)
|
foreach (var queue in queues)
|
||||||
{
|
{
|
||||||
var item = queue.Trait.AllItems().FirstOrDefault();
|
var current = queue.Trait.CurrentItem();
|
||||||
if (item == null)
|
if (current == null)
|
||||||
continue;
|
continue;
|
||||||
var icon = new Animation(RenderSimple.GetImage(item));
|
|
||||||
icon.Play(item.Traits.Get<TooltipInfo>().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<TooltipInfo>().Icon);
|
||||||
var size = icon.Image.size / new float2(2, 2);
|
var size = icon.Image.size / new float2(2, 2);
|
||||||
var location = new float2(RenderBounds.Location) + new float2(queue.i * (int)size.Length, 0);
|
var location = new float2(RenderBounds.Location) + new float2(queue.i * (int)size.Length, 0);
|
||||||
WidgetUtils.DrawSHP(icon.Image, location, worldRenderer, size);
|
WidgetUtils.DrawSHP(icon.Image, location, worldRenderer, size);
|
||||||
|
|
||||||
var current = queue.Trait.CurrentItem();
|
|
||||||
if (current == null)
|
|
||||||
continue;
|
|
||||||
var clock = clocks[queue.Trait];
|
var clock = clocks[queue.Trait];
|
||||||
clock.PlayFetchIndex("idle",
|
clock.PlayFetchIndex("idle",
|
||||||
() => current.TotalTime == 0 ? 0 : ((current.TotalTime - current.RemainingTime)
|
() => current.TotalTime == 0 ? 0 : ((current.TotalTime - current.RemainingTime)
|
||||||
|
|||||||
BIN
mods/cnc/bits/enemya.aud
Normal file
BIN
mods/cnc/bits/enemya.aud
Normal file
Binary file not shown.
@@ -379,6 +379,7 @@ HQ:
|
|||||||
LongDesc: Deploy an aerial napalm strike.\nBurns buildings and infantry along a line.
|
LongDesc: Deploy an aerial napalm strike.\nBurns buildings and infantry along a line.
|
||||||
EndChargeSound: airredy1.aud
|
EndChargeSound: airredy1.aud
|
||||||
SelectTargetSound: select1.aud
|
SelectTargetSound: select1.aud
|
||||||
|
IncomingSound: enemya.aud
|
||||||
UnitType: a10
|
UnitType: a10
|
||||||
SupportPowerChargeBar:
|
SupportPowerChargeBar:
|
||||||
|
|
||||||
@@ -473,10 +474,11 @@ TMPL:
|
|||||||
ChargeTime: 300
|
ChargeTime: 300
|
||||||
Description: Nuclear Strike
|
Description: Nuclear Strike
|
||||||
LongDesc: Launch a tactical nuke.\nApplies heavy damage over a large area.
|
LongDesc: Launch a tactical nuke.\nApplies heavy damage over a large area.
|
||||||
BeginChargeSound:
|
BeginChargeSound:
|
||||||
EndChargeSound: nukavail.aud
|
EndChargeSound: nukavail.aud
|
||||||
SelectTargetSound: select1.aud
|
SelectTargetSound: select1.aud
|
||||||
LaunchSound: nukel.aud
|
LaunchSound: nuklnch1.aud
|
||||||
|
IncomingSound: nuke1.aud
|
||||||
MissileWeapon: atomic
|
MissileWeapon: atomic
|
||||||
SupportPowerChargeBar:
|
SupportPowerChargeBar:
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ c17:
|
|||||||
idle:
|
idle:
|
||||||
Start: 0
|
Start: 0
|
||||||
Facings: 32
|
Facings: 32
|
||||||
icon: c17iconh
|
icon: c17icnh
|
||||||
Start: 0
|
Start: 0
|
||||||
|
|
||||||
tran:
|
tran:
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ GrenadierExplode:
|
|||||||
ImpactSound: xplosml2.aud
|
ImpactSound: xplosml2.aud
|
||||||
|
|
||||||
Atomic:
|
Atomic:
|
||||||
|
Report: nukemisl.aud
|
||||||
Warhead@impact:
|
Warhead@impact:
|
||||||
Damage: 1000
|
Damage: 1000
|
||||||
Spread: 6
|
Spread: 6
|
||||||
|
|||||||
@@ -86,8 +86,9 @@ PALACEH:
|
|||||||
LongDesc: Launches a nuclear missile at a target location
|
LongDesc: Launches a nuclear missile at a target location
|
||||||
BeginChargeSound: HI_PREP.AUD
|
BeginChargeSound: HI_PREP.AUD
|
||||||
EndChargeSound: HI_DHRDY.AUD
|
EndChargeSound: HI_DHRDY.AUD
|
||||||
SelectTargetSound:
|
SelectTargetSound:
|
||||||
LaunchSound:
|
LaunchSound:
|
||||||
|
IncomingSound:
|
||||||
MissileWeapon: atomic
|
MissileWeapon: atomic
|
||||||
SpawnOffset:-512,1c171,0
|
SpawnOffset:-512,1c171,0
|
||||||
CanPowerDown:
|
CanPowerDown:
|
||||||
|
|||||||
@@ -819,7 +819,6 @@ Rules:
|
|||||||
Cost: 800
|
Cost: 800
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Bomber
|
Name: Bomber
|
||||||
Icon: MNLYICON
|
|
||||||
Description: Lays mines to destroy unwary enemy units.\n Unarmed
|
Description: Lays mines to destroy unwary enemy units.\n Unarmed
|
||||||
Health:
|
Health:
|
||||||
HP: 500
|
HP: 500
|
||||||
@@ -858,7 +857,7 @@ Rules:
|
|||||||
Period: 150
|
Period: 150
|
||||||
Amount: 30
|
Amount: 30
|
||||||
ChronoshiftPower:
|
ChronoshiftPower:
|
||||||
Image: warpicon
|
Icon: chrono
|
||||||
ChargeTime: 60
|
ChargeTime: 60
|
||||||
Description: Chronoshift
|
Description: Chronoshift
|
||||||
LongDesc: Teleport a group of vehicles across\nthe map.
|
LongDesc: Teleport a group of vehicles across\nthe map.
|
||||||
@@ -869,7 +868,7 @@ Rules:
|
|||||||
KillCargo: yes
|
KillCargo: yes
|
||||||
Range: 3
|
Range: 3
|
||||||
IronCurtainPower:
|
IronCurtainPower:
|
||||||
Image: infxicon
|
Icon: invuln
|
||||||
ChargeTime: 30
|
ChargeTime: 30
|
||||||
Description: Invulnerability
|
Description: Invulnerability
|
||||||
LongDesc: Makes a unit invulnerable\nfor 3 seconds.
|
LongDesc: Makes a unit invulnerable\nfor 3 seconds.
|
||||||
@@ -889,7 +888,6 @@ Rules:
|
|||||||
Buildable:
|
Buildable:
|
||||||
Queue: Building
|
Queue: Building
|
||||||
BuildPaletteOrder: 30
|
BuildPaletteOrder: 30
|
||||||
#Prerequisites: MNLYR
|
|
||||||
Owner: allies, soviet
|
Owner: allies, soviet
|
||||||
Hotkey: b
|
Hotkey: b
|
||||||
Valued:
|
Valued:
|
||||||
@@ -902,7 +900,6 @@ Rules:
|
|||||||
BelowUnits:
|
BelowUnits:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Bomb
|
Name: Bomb
|
||||||
Icon: jmin
|
|
||||||
Description: Bomb (Hotkey B)
|
Description: Bomb (Hotkey B)
|
||||||
ProximityCaptor:
|
ProximityCaptor:
|
||||||
Types: Mine
|
Types: Mine
|
||||||
@@ -917,6 +914,7 @@ Rules:
|
|||||||
AttackFrontal:
|
AttackFrontal:
|
||||||
Explodes:
|
Explodes:
|
||||||
DemoTruck:
|
DemoTruck:
|
||||||
|
BodyOrientation:
|
||||||
|
|
||||||
T17:
|
T17:
|
||||||
Health:
|
Health:
|
||||||
@@ -932,7 +930,7 @@ Rules:
|
|||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Tree
|
Name: Tree
|
||||||
ChronoshiftPower:
|
ChronoshiftPower:
|
||||||
Image: warpicon
|
Icon: chrono
|
||||||
ChargeTime: 60
|
ChargeTime: 60
|
||||||
Description: Chronoshift
|
Description: Chronoshift
|
||||||
LongDesc: Teleport a group of vehicles across\nthe map.
|
LongDesc: Teleport a group of vehicles across\nthe map.
|
||||||
@@ -943,7 +941,7 @@ Rules:
|
|||||||
KillCargo: yes
|
KillCargo: yes
|
||||||
Range: 3
|
Range: 3
|
||||||
IronCurtainPower:
|
IronCurtainPower:
|
||||||
Image: infxicon
|
Icon: invuln
|
||||||
ChargeTime: 30
|
ChargeTime: 30
|
||||||
Description: Invulnerability
|
Description: Invulnerability
|
||||||
LongDesc: Makes a unit invulnerable\nfor 3 seconds.
|
LongDesc: Makes a unit invulnerable\nfor 3 seconds.
|
||||||
@@ -964,6 +962,12 @@ Sequences:
|
|||||||
damaged-build:
|
damaged-build:
|
||||||
Start: 1
|
Start: 1
|
||||||
Length: *
|
Length: *
|
||||||
|
icon: jmin
|
||||||
|
Start: 0
|
||||||
|
|
||||||
|
mnlyr:
|
||||||
|
icon mnlyicon
|
||||||
|
|
||||||
brick:
|
brick:
|
||||||
idle:
|
idle:
|
||||||
Start: 0
|
Start: 0
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ MSLO:
|
|||||||
BeginChargeSound: aprep1.aud
|
BeginChargeSound: aprep1.aud
|
||||||
EndChargeSound: aready1.aud
|
EndChargeSound: aready1.aud
|
||||||
SelectTargetSound: slcttgt1.aud
|
SelectTargetSound: slcttgt1.aud
|
||||||
LaunchSound: alaunch1.aud
|
IncomingSound: alaunch1.aud
|
||||||
|
LaunchSound:
|
||||||
MissileWeapon: atomic
|
MissileWeapon: atomic
|
||||||
SpawnOffset: 0,427,0
|
SpawnOffset: 0,427,0
|
||||||
DisplayTimer: True
|
DisplayTimer: True
|
||||||
|
|||||||
@@ -704,7 +704,6 @@ MINP:
|
|||||||
Palette:
|
Palette:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Anti-Personnel Mine
|
Name: Anti-Personnel Mine
|
||||||
Icon: jmin
|
|
||||||
ProximityCaptor:
|
ProximityCaptor:
|
||||||
Types: Mine
|
Types: Mine
|
||||||
TargetableUnit:
|
TargetableUnit:
|
||||||
@@ -730,7 +729,6 @@ MINV:
|
|||||||
Palette:
|
Palette:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Anti-Tank Mine
|
Name: Anti-Tank Mine
|
||||||
Icon: jmin
|
|
||||||
ProximityCaptor:
|
ProximityCaptor:
|
||||||
Types: Mine
|
Types: Mine
|
||||||
TargetableUnit:
|
TargetableUnit:
|
||||||
@@ -827,7 +825,7 @@ FLARE:
|
|||||||
|
|
||||||
powerproxy.parabombs:
|
powerproxy.parabombs:
|
||||||
AirstrikePower:
|
AirstrikePower:
|
||||||
Image: pbmbicon
|
Icon: parabombs
|
||||||
Description: Parabombs (Single Use)
|
Description: Parabombs (Single Use)
|
||||||
LongDesc: A Badger drops a load of parachuted\nbombs on your target.
|
LongDesc: A Badger drops a load of parachuted\nbombs on your target.
|
||||||
OneShot: yes
|
OneShot: yes
|
||||||
@@ -838,7 +836,7 @@ powerproxy.parabombs:
|
|||||||
|
|
||||||
powerproxy.sonarpulse:
|
powerproxy.sonarpulse:
|
||||||
SonarPulsePower:
|
SonarPulsePower:
|
||||||
Image: sonricon
|
Icon: sonar
|
||||||
Description: Sonar Pulse (Single Use)
|
Description: Sonar Pulse (Single Use)
|
||||||
LongDesc: Reveals all submarines on the map for a \nshort time.
|
LongDesc: Reveals all submarines on the map for a \nshort time.
|
||||||
AllowMultiple: yes
|
AllowMultiple: yes
|
||||||
|
|||||||
@@ -410,3 +410,15 @@ icon:
|
|||||||
Start: 0
|
Start: 0
|
||||||
gps: gpssicon
|
gps: gpssicon
|
||||||
Start: 0
|
Start: 0
|
||||||
|
parabombs: pbmbicon
|
||||||
|
Start: 0
|
||||||
|
sonar: sonricon
|
||||||
|
Start: 0
|
||||||
|
|
||||||
|
minp:
|
||||||
|
icon: jmin
|
||||||
|
Start: 0
|
||||||
|
|
||||||
|
minv:
|
||||||
|
icon: jmin
|
||||||
|
Start: 0
|
||||||
Reference in New Issue
Block a user