Rename LaserZap.TracksTarget to TrackTarget
And fix engineVersion of older Duration upgrade rule.
This commit is contained in:
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Projectiles
|
|||||||
public readonly Color Color = Color.Red;
|
public readonly Color Color = Color.Red;
|
||||||
|
|
||||||
[Desc("Beam follows the target.")]
|
[Desc("Beam follows the target.")]
|
||||||
public readonly bool TracksTarget = true;
|
public readonly bool TrackTarget = true;
|
||||||
|
|
||||||
[Desc("Maximum offset at the maximum range.")]
|
[Desc("Maximum offset at the maximum range.")]
|
||||||
public readonly WDist Inaccuracy = WDist.Zero;
|
public readonly WDist Inaccuracy = WDist.Zero;
|
||||||
@@ -120,7 +120,7 @@ namespace OpenRA.Mods.Common.Projectiles
|
|||||||
public void Tick(World world)
|
public void Tick(World world)
|
||||||
{
|
{
|
||||||
// Beam tracks target
|
// Beam tracks target
|
||||||
if (info.TracksTarget && args.GuidedTarget.IsValidFor(args.SourceActor))
|
if (info.TrackTarget && args.GuidedTarget.IsValidFor(args.SourceActor))
|
||||||
target = args.GuidedTarget.CenterPosition;
|
target = args.GuidedTarget.CenterPosition;
|
||||||
|
|
||||||
// Check for blocking actors
|
// Check for blocking actors
|
||||||
|
|||||||
@@ -751,14 +751,14 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Rename LaserZap BeamDuration to just Duration
|
// Rename LaserZap BeamDuration to just Duration
|
||||||
if (engineVersion < 20161009)
|
if (engineVersion < 20161020)
|
||||||
{
|
{
|
||||||
if (node.Key == "BeamDuration")
|
if (node.Key == "BeamDuration")
|
||||||
node.Key = "Duration";
|
node.Key = "Duration";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rename Bullet Angle to LaunchAngle
|
// Rename Bullet Angle to LaunchAngle
|
||||||
if (engineVersion < 20161016)
|
if (engineVersion < 20161020)
|
||||||
{
|
{
|
||||||
if (node.Key == "Angle")
|
if (node.Key == "Angle")
|
||||||
node.Key = "LaunchAngle";
|
node.Key = "LaunchAngle";
|
||||||
@@ -774,6 +774,13 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Rename LaserZap TracksTarget to TrackTarget
|
||||||
|
if (engineVersion < 20161217)
|
||||||
|
{
|
||||||
|
if (node.Key == "TracksTarget")
|
||||||
|
node.Key = "TrackTarget";
|
||||||
|
}
|
||||||
|
|
||||||
UpgradeWeaponRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
|
UpgradeWeaponRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user