Fix WithSpriteRotorOverlay upgrade rule to account for @ separator

This commit is contained in:
reaperrr
2015-11-06 15:09:42 +01:00
committed by Pavel Penev
parent 6d1551c9fd
commit afd75c7f55

View File

@@ -2201,11 +2201,22 @@ namespace OpenRA.Mods.Common.UtilityCommands
if (engineVersion < 20151004)
{
if (depth == 1 && node.Key == "WithRotor")
// Rename WithRotor to WithSpriteRotorOverlay
if (depth == 1 && node.Key.StartsWith("WithRotor"))
{
var parts = node.Key.Split('@');
node.Key = "WithSpriteRotorOverlay";
if (parts.Length > 1)
node.Key += "@" + parts[1];
}
if (depth == 1 && node.Key == "-WithRotor")
if (depth == 1 && node.Key.StartsWith("-WithRotor"))
{
var parts = node.Key.Split('@');
node.Key = "-WithSpriteRotorOverlay";
if (parts.Length > 1)
node.Key += "@" + parts[1];
}
}
if (engineVersion < 20151005)