diff --git a/OpenRA.Mods.Common/Effects/GravityBomb.cs b/OpenRA.Mods.Common/Effects/GravityBomb.cs index 0ad7c35ca6..81fbc583b4 100644 --- a/OpenRA.Mods.Common/Effects/GravityBomb.cs +++ b/OpenRA.Mods.Common/Effects/GravityBomb.cs @@ -19,6 +19,10 @@ namespace OpenRA.Mods.Common.Effects public class GravityBombInfo : IProjectileInfo { public readonly string Image = null; + [Desc("Sequence to loop while falling.")] + public readonly string Sequence = "idle"; + [Desc("Sequence to play when launched. Skipped if null.")] + public readonly string OpenSequence = null; public readonly string Palette = "effect"; public readonly bool Shadow = false; public readonly WRange Velocity = WRange.Zero; @@ -46,10 +50,14 @@ namespace OpenRA.Mods.Common.Effects acceleration = new WVec(WRange.Zero, WRange.Zero, info.Acceleration); anim = new Animation(args.SourceActor.World, info.Image); - if (anim.HasSequence("open")) - anim.PlayThen("open", () => anim.PlayRepeating("idle")); - else - anim.PlayRepeating("idle"); + + if (info.Image != null) + { + if (info.OpenSequence != null) + anim.PlayThen(info.OpenSequence, () => anim.PlayRepeating(info.Sequence)); + else + anim.PlayRepeating(info.Sequence); + } } public void Tick(World world) diff --git a/OpenRA.Mods.Common/Effects/LaserZap.cs b/OpenRA.Mods.Common/Effects/LaserZap.cs index 5068c686a9..97469faf65 100644 --- a/OpenRA.Mods.Common/Effects/LaserZap.cs +++ b/OpenRA.Mods.Common/Effects/LaserZap.cs @@ -26,8 +26,10 @@ namespace OpenRA.Mods.Common.Effects public readonly bool UsePlayerColor = false; [Desc("Laser color in (A,)R,G,B.")] public readonly Color Color = Color.Red; - [Desc("Impact animation. Requires a regular animation with idle: sequence instead of explosion special case.")] + [Desc("Impact animation.")] public readonly string HitAnim = null; + [Desc("Sequence of impact animation to use.")] + public readonly string HitAnimSequence = "idle"; public readonly string HitAnimPalette = "effect"; public IEffect Create(ProjectileArgs args) @@ -68,7 +70,7 @@ namespace OpenRA.Mods.Common.Effects if (!doneDamage) { if (hitanim != null) - hitanim.PlayThen("idle", () => animationComplete = true); + hitanim.PlayThen(info.HitAnimSequence, () => animationComplete = true); args.Weapon.Impact(Target.FromPos(target), args.SourceActor, args.DamageModifiers); doneDamage = true; diff --git a/mods/d2k/sequences/misc.yaml b/mods/d2k/sequences/misc.yaml index 43f05c7674..3b7c17adbb 100644 --- a/mods/d2k/sequences/misc.yaml +++ b/mods/d2k/sequences/misc.yaml @@ -260,9 +260,6 @@ smoke_m: BlendMode: Additive bombs: - open: DATA.R8 - Start: 3280 - Length: 4 idle: DATA.R8 Start: 3280 Length: 4 diff --git a/mods/ra/weapons/superweapons.yaml b/mods/ra/weapons/superweapons.yaml index e0f493b4fe..05048fc826 100644 --- a/mods/ra/weapons/superweapons.yaml +++ b/mods/ra/weapons/superweapons.yaml @@ -4,6 +4,7 @@ ParaBomb: Report: CHUTE1.AUD Projectile: GravityBomb Image: PARABOMB + OpenSequence: open Velocity: 43 Acceleration: 0 Warhead@1Dam: SpreadDamage