Merge pull request #12751 from abcdefg30/d2kSequences
Fix missing sequences in all mods
This commit is contained in:
@@ -59,10 +59,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly string BeaconImage = "beacon";
|
||||
[SequenceReference("BeaconImage")] public readonly string BeaconPoster = null;
|
||||
[PaletteReference] public readonly string BeaconPosterPalette = "chrome";
|
||||
[SequenceReference("BeaconImage")] public readonly string ClockSequence = "clock";
|
||||
|
||||
[SequenceReference("BeaconImage")] public readonly string ArrowSequence = "arrow";
|
||||
[SequenceReference("BeaconImage")] public readonly string CircleSequence = "circles";
|
||||
[SequenceReference("BeaconImage")] public readonly string ClockSequence = null;
|
||||
[SequenceReference("BeaconImage")] public readonly string ArrowSequence = null;
|
||||
[SequenceReference("BeaconImage")] public readonly string CircleSequence = null;
|
||||
|
||||
[Desc("Delay after launch, measured in ticks.")]
|
||||
public readonly int BeaconDelay = 0;
|
||||
|
||||
@@ -18,7 +18,6 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using OpenRA.FileSystem;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
@@ -830,6 +829,27 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
RenameNodeKey(node, "WithTeslaChargeAnimation");
|
||||
}
|
||||
|
||||
// Default values for ArrowSequence, CircleSequence and ClockSequence were changed (to null)
|
||||
if (engineVersion < 20170212)
|
||||
{
|
||||
var supportPowerNodes = new[] { "AirstrikePower", "ParatroopersPower", "NukePower" };
|
||||
|
||||
if (supportPowerNodes.Any(s => node.Key.StartsWith(s, StringComparison.Ordinal)))
|
||||
{
|
||||
var arrow = node.Value.Nodes.FirstOrDefault(n => n.Key == "ArrowSequence");
|
||||
if (arrow == null)
|
||||
node.Value.Nodes.Add(new MiniYamlNode("ArrowSequence", "arrow"));
|
||||
|
||||
var circle = node.Value.Nodes.FirstOrDefault(n => n.Key == "CircleSequence");
|
||||
if (circle == null)
|
||||
node.Value.Nodes.Add(new MiniYamlNode("CircleSequence", "circles"));
|
||||
|
||||
var clock = node.Value.Nodes.FirstOrDefault(n => n.Key == "ClockSequence");
|
||||
if (clock == null)
|
||||
node.Value.Nodes.Add(new MiniYamlNode("ClockSequence", "clock"));
|
||||
}
|
||||
}
|
||||
|
||||
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user