diff --git a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs index b37cdaab7f..ad7292213b 100644 --- a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs +++ b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs @@ -931,6 +931,14 @@ namespace OpenRA.Mods.Common.UtilityCommands } } + if (engineVersion < 20150504) + { + // Made buildings grant prerequisites explicitly. + if (depth == 0 && node.Value.Nodes.Exists(n => n.Key == "Inherits" && + (n.Value.Value == "^Building" || n.Value.Value == "^BaseBuilding"))) + node.Value.Nodes.Add(new MiniYamlNode("ProvidesCustomPrerequisite@buildingname", "")); + } + UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1); } }