From 88a4f73bdcb930cb204c27b46be07d086689054c Mon Sep 17 00:00:00 2001 From: Oliver Brakmann Date: Sun, 18 Sep 2016 14:20:58 +0200 Subject: [PATCH] Add advisory upgrade rule for WithRearmAnimation --- OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs index a7f1c124c1..486228374a 100644 --- a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs +++ b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs @@ -358,6 +358,15 @@ namespace OpenRA.Mods.Common.UtilityCommands } } + // Add a warning to add WithRearmAnimation to actors that might need it. + // Update rule added during prep-1609 stable period, date needs fixing after release. + if (engineVersion < 20160918 && depth == 2) + { + if (node.Key == "RearmBuildings") + foreach (var host in node.Value.Value.Split(',')) + Console.WriteLine("Actor type `{0}` is denoted as a RearmBuilding. Consider adding the `WithRearmAnimation` trait to it.".F(host)); + } + UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1); }