Add YAML upgrade rule

This commit is contained in:
penev92
2015-01-24 15:31:59 +02:00
parent 49508482c3
commit 828614d0f0

View File

@@ -695,9 +695,9 @@ namespace OpenRA.Mods.Common.UtilityCommands
if (depth == 1 && node.Key == "MustBeDestroyed")
node.Value.Nodes.Add(new MiniYamlNode("RequiredForShortGame", "true"));
// Remove PlayMusicOnMapLoad
if (engineVersion < 20150125)
{
// Remove PlayMusicOnMapLoad
if (depth == 0 && node.Value.Nodes.Exists(n => n.Key == "PlayMusicOnMapLoad"))
{
node.Value.Nodes.RemoveAll(n => n.Key == "PlayMusicOnMapLoad");
@@ -705,6 +705,10 @@ namespace OpenRA.Mods.Common.UtilityCommands
Console.WriteLine("Please use the Lua API function 'PlayMusic' instead.");
Console.WriteLine("See http://wiki.openra.net/Lua-API for details.");
}
// Remove TiberiumRefinery and OreRefinery
if (node.Key == "TiberiumRefinery" || node.Key == "OreRefinery")
node.Key = "Refinery";
}
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);