Added WithMoveAnimation trait

RenderUnitFlying -> WithUnitBody + WithMoveAnimation upgrade rule

Make TD Orca use WithMoveAnimation
Remove RenderUnitFlying
This commit is contained in:
reaperrr
2015-05-12 03:52:41 +02:00
parent 4d79cce491
commit 733b7fc0b0
5 changed files with 35 additions and 15 deletions

View File

@@ -1066,6 +1066,23 @@ namespace OpenRA.Mods.Common.UtilityCommands
if (rrur != null)
rrur.Key = "-WithFacingSpriteBody";
}
// For RenderUnitFlying
var ruf = node.Value.Nodes.Where(x => x.Key == "RenderUnitFlying");
if (ruf.Any())
{
ruf.Do(x => x.Key = "RenderSprites");
node.Value.Nodes.Add(new MiniYamlNode("AutoSelectionSize", ""));
node.Value.Nodes.Add(new MiniYamlNode("WithFacingSpriteBody", ""));
node.Value.Nodes.Add(new MiniYamlNode("WithMoveAnimation", "", new List<MiniYamlNode>
{
new MiniYamlNode("MoveSequence", "move")
}));
var rruf = node.Value.Nodes.FirstOrDefault(n => n.Key == "-RenderUnitFlying");
if (rruf != null)
rruf.Key = "-WithFacingSpriteBody";
}
}
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);