Adapt D2k to low power/power down refactor

This commit is contained in:
reaperrr
2017-09-11 23:13:16 +02:00
committed by Pavel Penev
parent 7537daf74e
commit e0e1f56af5
3 changed files with 30 additions and 19 deletions

View File

@@ -51,4 +51,6 @@ outpostnopower:
Inherits: outpost Inherits: outpost
Buildable: Buildable:
Prerequisites: ~disabled Prerequisites: ~disabled
-RequiresPower: GrantCondition@IDISABLE:
RequiresCondition: powerdown
-GrantConditionOnPowerState@LOWPOWER:

View File

@@ -470,9 +470,29 @@
Categories: Defense Categories: Defense
-CommandBarBlacklist: -CommandBarBlacklist:
^DisabledOverlay: ^DisableOnLowPower:
WithColoredOverlay@IDISABLE: WithColoredOverlay@IDISABLE:
RequiresCondition: disabled RequiresCondition: disabled
Palette: disabled Palette: disabled
GrantConditionOnDisabled@IDISABLE: GrantConditionOnPowerState@LOWPOWER:
Condition: lowpower
ValidPowerStates: Low, Critical
GrantCondition@IDISABLE:
RequiresCondition: lowpower
Condition: disabled Condition: disabled
^DisableOnLowPowerOrPowerDown:
Inherits: ^DisableOnLowPower
GrantCondition@IDISABLE:
RequiresCondition: lowpower || powerdown
Condition: disabled
CanPowerDown:
PowerupSound: EnablePower
PowerdownSound: DisablePower
PowerdownCondition: powerdown
WithDecoration@POWERDOWN:
Image: poweroff
Sequence: offline
Palette: chrome
RequiresCondition: powerdown
ReferencePoint: Center

View File

@@ -534,11 +534,7 @@ heavy_factory:
outpost: outpost:
Inherits: ^Building Inherits: ^Building
Inherits@IDISABLE: ^DisabledOverlay Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
RequiresPower:
CanPowerDown:
PowerupSound: EnablePower
PowerdownSound: DisablePower
Buildable: Buildable:
Prerequisites: barracks, ~techlevel.medium Prerequisites: barracks, ~techlevel.medium
Queue: Building Queue: Building
@@ -589,7 +585,6 @@ outpost:
starport: starport:
Inherits: ^Building Inherits: ^Building
Inherits@IDISABLE: ^DisabledOverlay
Tooltip: Tooltip:
Name: Starport Name: Starport
Buildable: Buildable:
@@ -764,8 +759,10 @@ medium_gun_turret:
large_gun_turret: large_gun_turret:
Inherits: ^Defense Inherits: ^Defense
Inherits@IDISABLE: ^DisabledOverlay Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
Inherits@AUTOTARGET: ^AutoTargetGround Inherits@AUTOTARGET: ^AutoTargetGround
AttackTurreted:
RequiresCondition: !disabled
Buildable: Buildable:
Queue: Building Queue: Building
Prerequisites: outpost, upgrade.conyard, ~techlevel.medium Prerequisites: outpost, upgrade.conyard, ~techlevel.medium
@@ -799,10 +796,6 @@ large_gun_turret:
Turreted: Turreted:
TurnSpeed: 8 TurnSpeed: 8
InitialFacing: 128 InitialFacing: 128
RequiresPower:
CanPowerDown:
PowerupSound: EnablePower
PowerdownSound: DisablePower
Power: Power:
Amount: -60 Amount: -60
SelectionDecorations: SelectionDecorations:
@@ -1000,7 +993,7 @@ research_centre:
palace: palace:
Inherits: ^Building Inherits: ^Building
Inherits@IDISABLE: ^DisabledOverlay Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
Buildable: Buildable:
Prerequisites: research_centre, ~techlevel.high Prerequisites: research_centre, ~techlevel.high
Queue: Building Queue: Building
@@ -1115,10 +1108,6 @@ palace:
ExitCell: 0,3 ExitCell: 0,3
Production: Production:
Produces: Palace Produces: Palace
CanPowerDown:
PowerupSound: EnablePower
PowerdownSound: DisablePower
RequiresPower:
SupportPowerChargeBar: SupportPowerChargeBar:
ProvidesPrerequisite@buildingname: ProvidesPrerequisite@buildingname: