check for missing sequence entries using lint
This commit is contained in:
@@ -27,6 +27,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
[Desc("Maximum offset at the maximum range.")]
|
||||
public readonly WRange Inaccuracy = WRange.Zero;
|
||||
public readonly string Image = null;
|
||||
[SequenceReference("Image")] public readonly string Sequence = "idle";
|
||||
public readonly string Palette = "effect";
|
||||
public readonly bool Shadow = false;
|
||||
[Desc("Trail animation.")]
|
||||
@@ -138,7 +139,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
if (!string.IsNullOrEmpty(info.Trail) && --smokeTicks < 0)
|
||||
{
|
||||
var delayedPos = WPos.LerpQuadratic(args.Source, target, angle, ticks - info.TrailDelay, length);
|
||||
world.AddFrameEndTask(w => w.Add(new Smoke(w, delayedPos, info.Trail, trailPalette)));
|
||||
world.AddFrameEndTask(w => w.Add(new Smoke(w, delayedPos, info.Trail, trailPalette, info.Sequence)));
|
||||
smokeTicks = info.TrailInterval;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
class MissileInfo : IProjectileInfo
|
||||
{
|
||||
public readonly string Image = null;
|
||||
[SequenceReference("Image")] public readonly string Sequence = "idle";
|
||||
public readonly string Palette = "effect";
|
||||
public readonly bool Shadow = false;
|
||||
[Desc("Projectile speed in WRange / tick")]
|
||||
@@ -171,7 +172,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
|
||||
if (!string.IsNullOrEmpty(info.Trail) && --ticksToNextSmoke < 0)
|
||||
{
|
||||
world.AddFrameEndTask(w => w.Add(new Smoke(w, pos - 3 * move / 2, info.Trail, trailPalette)));
|
||||
world.AddFrameEndTask(w => w.Add(new Smoke(w, pos - 3 * move / 2, info.Trail, trailPalette, info.Sequence)));
|
||||
ticksToNextSmoke = info.TrailInterval;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,14 +40,14 @@ namespace OpenRA.Mods.Common.Effects
|
||||
if (parachuteSprite != null)
|
||||
{
|
||||
parachute = new Animation(cargo.World, parachuteSprite);
|
||||
parachute.PlayThen("open", () => parachute.PlayRepeating("idle"));
|
||||
parachute.PlayThen(parachutableInfo.ParachuteOpenSequence, () => parachute.PlayRepeating(parachutableInfo.ParachuteIdleSequence));
|
||||
}
|
||||
|
||||
var shadowSprite = parachutableInfo != null ? parachutableInfo.ShadowSequence : null;
|
||||
if (shadowSprite != null)
|
||||
{
|
||||
shadow = new Animation(cargo.World, shadowSprite);
|
||||
shadow.PlayRepeating("idle");
|
||||
shadow.PlayRepeating(parachutableInfo.ParachuteIdleSequence);
|
||||
}
|
||||
|
||||
if (parachutableInfo != null)
|
||||
|
||||
@@ -21,14 +21,14 @@ namespace OpenRA.Mods.Common.Effects
|
||||
readonly Animation anim;
|
||||
readonly string palette;
|
||||
|
||||
public Smoke(World world, WPos pos, string trail, string palette)
|
||||
public Smoke(World world, WPos pos, string trail, string palette, string sequence)
|
||||
{
|
||||
this.world = world;
|
||||
this.pos = pos;
|
||||
this.palette = palette;
|
||||
|
||||
anim = new Animation(world, trail);
|
||||
anim.PlayThen("idle",
|
||||
anim.PlayThen(sequence,
|
||||
() => world.AddFrameEndTask(w => w.Remove(this)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user