diff --git a/OpenRA.Utility/UpgradeRules.cs b/OpenRA.Utility/UpgradeRules.cs index 7105d21b51..73ac70061e 100644 --- a/OpenRA.Utility/UpgradeRules.cs +++ b/OpenRA.Utility/UpgradeRules.cs @@ -222,6 +222,16 @@ namespace OpenRA.Utility } } + // "disabled" palette overlay has been moved into it's own DisabledOverlay trait + if (engineVersion < 20140305) + { + if (node.Value.Nodes.Any(n => n.Key.StartsWith("RequiresPower")) + && !node.Value.Nodes.Any(n => n.Key.StartsWith("DisabledOverlay"))) + { + node.Value.Nodes.Add(new MiniYamlNode("DisabledOverlay", new MiniYaml(""))); + } + } + // ChronoshiftDeploy was replaced with PortableChrono if (engineVersion < 20140321) { diff --git a/mods/cnc/rules/structures.yaml b/mods/cnc/rules/structures.yaml index e32218487b..8641a294a9 100644 --- a/mods/cnc/rules/structures.yaml +++ b/mods/cnc/rules/structures.yaml @@ -543,7 +543,6 @@ GUN: SAM: Inherits: ^Building - RequiresPower: Valued: Cost: 750 CustomBuildTimeValue: @@ -560,6 +559,8 @@ SAM: Power: -20 Footprint: xx Dimensions: 2,1 + RequiresPower: + DisabledOverlay: -GivesBuildableArea: Health: HP: 400 @@ -581,7 +582,6 @@ SAM: RenderRangeCircle: OBLI: - RequiresPower: Inherits: ^Building Valued: Cost: 1500 @@ -599,6 +599,8 @@ OBLI: Power: -150 Footprint: _ x Dimensions: 1,2 + RequiresPower: + DisabledOverlay: -GivesBuildableArea: Health: HP: 600 @@ -666,7 +668,6 @@ GTWR: ATWR: Inherits: ^Building - RequiresPower: Valued: Cost: 1000 CustomBuildTimeValue: @@ -683,6 +684,8 @@ ATWR: Power: -40 Footprint: _ x Dimensions: 1,2 + RequiresPower: + DisabledOverlay: -GivesBuildableArea: Health: HP: 600