From bb790b83e6022598ed226f3f87ebd19dd32431ca Mon Sep 17 00:00:00 2001 From: reaperrr Date: Tue, 12 Sep 2017 19:30:04 +0200 Subject: [PATCH] Adapt TD to low power/power-down refactor Removed CanPowerDown from TD buildings. Manual power-down is intentionally not supported by the in-game UI, the remaining CanPowerDown entries were effectively bit-rot. --- mods/cnc/rules/defaults.yaml | 7 ++++--- mods/cnc/rules/structures.yaml | 32 ++++++++++---------------------- 2 files changed, 14 insertions(+), 25 deletions(-) diff --git a/mods/cnc/rules/defaults.yaml b/mods/cnc/rules/defaults.yaml index 4622a15e62..a39a2e8cb9 100644 --- a/mods/cnc/rules/defaults.yaml +++ b/mods/cnc/rules/defaults.yaml @@ -1025,8 +1025,9 @@ -AcceptsDeliveredCash: ^DisabledOverlay: + GrantConditionOnPowerState@LOWPOWER: + Condition: lowpower + ValidPowerStates: Low, Critical WithColoredOverlay@IDISABLE: - RequiresCondition: disabled + RequiresCondition: lowpower Palette: disabled - GrantConditionOnDisabled@IDISABLE: - Condition: disabled diff --git a/mods/cnc/rules/structures.yaml b/mods/cnc/rules/structures.yaml index f8829e0da2..4189c5cad3 100644 --- a/mods/cnc/rules/structures.yaml +++ b/mods/cnc/rules/structures.yaml @@ -516,24 +516,20 @@ HQ: Bounds: 48,40,0,9 SelectionDecorations: VisualBounds: 48,53,0,-4 - RequiresPower: - CanPowerDown: - PowerupSound: EnablePower - PowerdownSound: DisablePower WithSpriteBody: - PauseAnimationWhenDisabled: true + PauseOnCondition: lowpower Health: HP: 800 RevealsShroud: Range: 10c0 WithBuildingBib: ProvidesRadar: - RequiresCondition: !disabled + RequiresCondition: !lowpower RenderDetectionCircle: DetectCloaked: Range: 5c0 AirstrikePower: - PauseOnCondition: disabled + PauseOnCondition: lowpower Prerequisites: ~techlevel.superweapons Icon: airstrike ChargeTime: 240 @@ -628,24 +624,20 @@ EYE: Bounds: 48,40,0,9 SelectionDecorations: VisualBounds: 48,53,0,-4 - RequiresPower: - CanPowerDown: - PowerupSound: EnablePower - PowerdownSound: DisablePower WithSpriteBody: - PauseAnimationWhenDisabled: true + PauseOnCondition: lowpower Health: HP: 1300 RevealsShroud: Range: 10c0 WithBuildingBib: ProvidesRadar: - RequiresCondition: !disabled + RequiresCondition: !lowpower RenderDetectionCircle: DetectCloaked: Range: 5c0 IonCannonPower: - PauseOnCondition: disabled + PauseOnCondition: lowpower Prerequisites: ~techlevel.superweapons Icon: ioncannon Cursor: ioncannon @@ -690,10 +682,6 @@ TMPL: Bounds: 72,48 SelectionDecorations: VisualBounds: 72,68,0,-12 - RequiresPower: - CanPowerDown: - PowerupSound: EnablePower - PowerdownSound: DisablePower Health: HP: 2100 RevealsShroud: @@ -703,7 +691,7 @@ TMPL: DetectCloaked: Range: 5c0 NukePower: - PauseOnCondition: disabled + PauseOnCondition: lowpower Prerequisites: ~techlevel.superweapons Icon: abomb Cursor: nuke @@ -799,7 +787,6 @@ SAM: Building: Footprint: xx Dimensions: 2,1 - RequiresPower: Health: HP: 400 Armor: @@ -817,6 +804,7 @@ SAM: Weapon: Dragon MuzzleSequence: muzzle AttackPopupTurreted: + RequiresCondition: !lowpower WithMuzzleOverlay: -RenderDetectionCircle: Power: @@ -843,7 +831,6 @@ OBLI: Bounds: 24,24 SelectionDecorations: VisualBounds: 22,44,0,-10 - RequiresPower: Health: HP: 600 Armor: @@ -857,6 +844,7 @@ OBLI: Weapon: Laser LocalOffset: 0,-85,1280 AttackCharges: + RequiresCondition: !lowpower ChargeLevel: 50 ChargingCondition: charging AmbientSound: @@ -924,7 +912,6 @@ ATWR: Bounds: 24,24 SelectionDecorations: VisualBounds: 22,48,0,-12 - RequiresPower: Health: HP: 550 Armor: @@ -945,6 +932,7 @@ ATWR: LocalOffset: 256,128,0, 256,-128,0 LocalYaw: -100,100 AttackTurreted: + RequiresCondition: !lowpower BodyOrientation: QuantizedFacings: 8 DetectCloaked: