From c8c0cc52b6a1c326d16baf900de8f8a0027efaa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 11 Jul 2015 17:00:06 +0200 Subject: [PATCH] add missing sequence references and add spaces for readability --- OpenRA.Mods.Common/Effects/Bullet.cs | 4 ++-- OpenRA.Mods.Common/Effects/GravityBomb.cs | 10 ++++++++-- OpenRA.Mods.Common/Effects/LaserZap.cs | 8 +++++++- OpenRA.Mods.Common/Effects/Missile.cs | 16 ++++++++++++++++ 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/OpenRA.Mods.Common/Effects/Bullet.cs b/OpenRA.Mods.Common/Effects/Bullet.cs index 30236ec260..bef851c0da 100644 --- a/OpenRA.Mods.Common/Effects/Bullet.cs +++ b/OpenRA.Mods.Common/Effects/Bullet.cs @@ -31,8 +31,8 @@ namespace OpenRA.Mods.Common.Effects [Desc("Image to display.")] public readonly string Image = null; - [Desc("Loop this sequence of Image while this projectile is moving."), SequenceReference("Image")] - public readonly string Sequence = "idle"; + [Desc("Loop this sequence of Image while this projectile is moving.")] + [SequenceReference("Image")] public readonly string Sequence = "idle"; [Desc("The palette used to draw this projectile.")] public readonly string Palette = "effect"; diff --git a/OpenRA.Mods.Common/Effects/GravityBomb.cs b/OpenRA.Mods.Common/Effects/GravityBomb.cs index b41438b0d3..0a3bb40a08 100644 --- a/OpenRA.Mods.Common/Effects/GravityBomb.cs +++ b/OpenRA.Mods.Common/Effects/GravityBomb.cs @@ -19,13 +19,19 @@ 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"; + [SequenceReference("Image")] public readonly string Sequence = "idle"; + [Desc("Sequence to play when launched. Skipped if null or empty.")] - public readonly string OpenSequence = null; + [SequenceReference("Image")] public readonly string OpenSequence = null; + public readonly string Palette = "effect"; + public readonly bool Shadow = false; + public readonly WDist Velocity = WDist.Zero; + [Desc("Value added to velocity every tick.")] public readonly WDist Acceleration = new WDist(15); diff --git a/OpenRA.Mods.Common/Effects/LaserZap.cs b/OpenRA.Mods.Common/Effects/LaserZap.cs index c7cab338fb..6018af5273 100644 --- a/OpenRA.Mods.Common/Effects/LaserZap.cs +++ b/OpenRA.Mods.Common/Effects/LaserZap.cs @@ -22,14 +22,20 @@ namespace OpenRA.Mods.Common.Effects class LaserZapInfo : IProjectileInfo { public readonly int BeamWidth = 2; + public readonly int BeamDuration = 10; + public readonly bool UsePlayerColor = false; + [Desc("Laser color in (A,)R,G,B.")] public readonly Color Color = Color.Red; + [Desc("Impact animation.")] public readonly string HitAnim = null; + [Desc("Sequence of impact animation to use.")] - public readonly string HitAnimSequence = "idle"; + [SequenceReference("HitAnim")] public readonly string HitAnimSequence = "idle"; + public readonly string HitAnimPalette = "effect"; public IEffect Create(ProjectileArgs args) diff --git a/OpenRA.Mods.Common/Effects/Missile.cs b/OpenRA.Mods.Common/Effects/Missile.cs index 903e1a1b88..bfd59ea81c 100644 --- a/OpenRA.Mods.Common/Effects/Missile.cs +++ b/OpenRA.Mods.Common/Effects/Missile.cs @@ -24,38 +24,54 @@ namespace OpenRA.Mods.Common.Effects { 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 WDist / tick")] public readonly WDist Speed = new WDist(8); + [Desc("Maximum vertical pitch when changing altitude.")] public readonly WAngle MaximumPitch = WAngle.FromDegrees(30); + [Desc("How many ticks before this missile is armed and can explode.")] public readonly int Arm = 0; + [Desc("Is the missile blocked by actors with BlocksProjectiles: trait.")] public readonly bool Blockable = true; + [Desc("Maximum offset at the maximum range")] public readonly WDist Inaccuracy = WDist.Zero; + [Desc("Probability of locking onto and following target.")] public readonly int LockOnProbability = 100; + [Desc("In n/256 per tick.")] public readonly int RateOfTurn = 5; + [Desc("Explode when following the target longer than this many ticks.")] public readonly int RangeLimit = 0; + [Desc("Trail animation.")] public readonly string Trail = null; + [Desc("Interval in ticks between each spawned Trail animation.")] public readonly int TrailInterval = 2; + public readonly string TrailPalette = "effect"; public readonly bool TrailUsePlayerPalette = false; public readonly int ContrailLength = 0; public readonly Color ContrailColor = Color.White; public readonly bool ContrailUsePlayerColor = false; public readonly int ContrailDelay = 1; + [Desc("Should missile targeting be thrown off by nearby actors with JamsMissiles.")] public readonly bool Jammable = true; + [Desc("Explodes when leaving the following terrain type, e.g., Water for torpedoes.")] public readonly string BoundToTerrainType = ""; + [Desc("Explodes when inside this proximity radius to target.", "Note: If this value is lower than the missile speed, this check might", "not trigger fast enough, causing the missile to fly past the target.")]