Refactor Shape.Rectangle.RotateToIsometry

And fixes TS wall and gate shapes.
This commit is contained in:
reaperrr
2017-05-04 17:33:06 +02:00
committed by Chris Forbes
parent b11af3bcb5
commit ccda89f268
3 changed files with 32 additions and 10 deletions

View File

@@ -651,6 +651,18 @@ namespace OpenRA.Mods.Common.UtilityCommands
}
}
// Refactor Rectangle shape RotateToIsometry bool into WAngle LocalYaw
if (engineVersion < 20170509)
{
if (node.Key.StartsWith("RotateToIsometry", StringComparison.Ordinal))
{
var value = FieldLoader.GetValue<bool>("RotateToIsometry", node.Value.Value);
node.Value.Value = value ? "128" : "0";
node.Key = "LocalYaw";
}
}
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
}