Rename LaserZap.BeamDuration to Duration
This commit is contained in:
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.Common.Projectiles
|
|||||||
[Desc("Equivalent to sequence ZOffset. Controls Z sorting.")]
|
[Desc("Equivalent to sequence ZOffset. Controls Z sorting.")]
|
||||||
public readonly int ZOffset = 0;
|
public readonly int ZOffset = 0;
|
||||||
|
|
||||||
public readonly int BeamDuration = 10;
|
public readonly int Duration = 10;
|
||||||
|
|
||||||
public readonly bool UsePlayerColor = false;
|
public readonly bool UsePlayerColor = false;
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ namespace OpenRA.Mods.Common.Projectiles
|
|||||||
if (hitanim != null)
|
if (hitanim != null)
|
||||||
hitanim.Tick();
|
hitanim.Tick();
|
||||||
|
|
||||||
if (++ticks >= info.BeamDuration && animationComplete)
|
if (++ticks >= info.Duration && animationComplete)
|
||||||
world.AddFrameEndTask(w => w.Remove(this));
|
world.AddFrameEndTask(w => w.Remove(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,9 +104,9 @@ namespace OpenRA.Mods.Common.Projectiles
|
|||||||
wr.World.FogObscures(args.Source))
|
wr.World.FogObscures(args.Source))
|
||||||
yield break;
|
yield break;
|
||||||
|
|
||||||
if (ticks < info.BeamDuration)
|
if (ticks < info.Duration)
|
||||||
{
|
{
|
||||||
var rc = Color.FromArgb((info.BeamDuration - ticks) * color.A / info.BeamDuration, color);
|
var rc = Color.FromArgb((info.Duration - ticks) * color.A / info.Duration, color);
|
||||||
yield return new BeamRenderable(args.Source, info.ZOffset, target - args.Source, info.Shape, info.Width, rc);
|
yield return new BeamRenderable(args.Source, info.ZOffset, target - args.Source, info.Shape, info.Width, rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -422,6 +422,13 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
|||||||
node.Key = "Speed";
|
node.Key = "Speed";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Rename LaserZap BeamDuration to just Duration
|
||||||
|
if (engineVersion < 20161009)
|
||||||
|
{
|
||||||
|
if (node.Key == "BeamDuration")
|
||||||
|
node.Key = "Duration";
|
||||||
|
}
|
||||||
|
|
||||||
UpgradeWeaponRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
|
UpgradeWeaponRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ TurretLaserFire:
|
|||||||
Report: lastur1.aud
|
Report: lastur1.aud
|
||||||
Projectile: LaserZap
|
Projectile: LaserZap
|
||||||
Width: 50
|
Width: 50
|
||||||
BeamDuration: 5
|
Duration: 5
|
||||||
ZOffset: 2047
|
ZOffset: 2047
|
||||||
Color: FF000045
|
Color: FF000045
|
||||||
Warhead@1Dam: SpreadDamage
|
Warhead@1Dam: SpreadDamage
|
||||||
|
|||||||
Reference in New Issue
Block a user