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
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -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 ),
|
||||
|
||||
@@ -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<RenderSimple>();
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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<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 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)
|
||||
|
||||
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.
|
||||
EndChargeSound: airredy1.aud
|
||||
SelectTargetSound: select1.aud
|
||||
IncomingSound: enemya.aud
|
||||
UnitType: a10
|
||||
SupportPowerChargeBar:
|
||||
|
||||
@@ -476,7 +477,8 @@ TMPL:
|
||||
BeginChargeSound:
|
||||
EndChargeSound: nukavail.aud
|
||||
SelectTargetSound: select1.aud
|
||||
LaunchSound: nukel.aud
|
||||
LaunchSound: nuklnch1.aud
|
||||
IncomingSound: nuke1.aud
|
||||
MissileWeapon: atomic
|
||||
SupportPowerChargeBar:
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ c17:
|
||||
idle:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
icon: c17iconh
|
||||
icon: c17icnh
|
||||
Start: 0
|
||||
|
||||
tran:
|
||||
|
||||
@@ -60,6 +60,7 @@ GrenadierExplode:
|
||||
ImpactSound: xplosml2.aud
|
||||
|
||||
Atomic:
|
||||
Report: nukemisl.aud
|
||||
Warhead@impact:
|
||||
Damage: 1000
|
||||
Spread: 6
|
||||
|
||||
@@ -88,6 +88,7 @@ PALACEH:
|
||||
EndChargeSound: HI_DHRDY.AUD
|
||||
SelectTargetSound:
|
||||
LaunchSound:
|
||||
IncomingSound:
|
||||
MissileWeapon: atomic
|
||||
SpawnOffset:-512,1c171,0
|
||||
CanPowerDown:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user