Adapt TS to power-related trait refactorings

This commit is contained in:
reaperrr
2017-08-04 13:28:47 +02:00
committed by Pavel Penev
parent 99edc71c54
commit 7537daf74e
6 changed files with 84 additions and 92 deletions

View File

@@ -1200,18 +1200,38 @@
SpawnAtLastPosition: false
RequiresCondition: !inside-tunnel
^DisabledOverlay:
^DisableOnLowPower:
WithColoredOverlay@IDISABLE:
RequiresCondition: disabled
Palette: disabled
GrantConditionOnDisabled@IDISABLE:
GrantConditionOnPowerState@LOWPOWER:
Condition: lowpower
ValidPowerStates: Low, Critical
GrantCondition@IDISABLE:
RequiresCondition: lowpower
Condition: disabled
^DisabledByPowerOutage:
AffectedByPowerOutage:
Condition: power-outage
InfiltrateForPowerOutage:
DisableOnCondition@POWER_OUTAGE:
RequiresCondition: power-outage
Power:
RequiresCondition: !power-outage
^DisableOnPowerDown:
WithColoredOverlay@IDISABLE:
RequiresCondition: disabled
Palette: disabled
GrantCondition@IDISABLE:
RequiresCondition: powerdown
Condition: disabled
CanPowerDown:
PowerupSpeech: EnablePower
PowerdownSpeech: DisablePower
PowerdownCondition: powerdown
WithDecoration@POWERDOWN:
Image: poweroff
Sequence: offline
Palette: mouse
RequiresCondition: powerdown
ReferencePoint: Center
^DisableOnLowPowerOrPowerDown:
Inherits@LOWPOWER: ^DisableOnLowPower
Inherits@POWERDOWN: ^DisableOnPowerDown
GrantCondition@IDISABLE:
RequiresCondition: lowpower || powerdown
Condition: disabled

View File

@@ -1,7 +1,5 @@
GAPOWR:
Inherits: ^Building
Inherits@IDISABLE: ^DisabledOverlay
Inherits@POWER_OUTAGE: ^DisabledByPowerOutage
Inherits@SHAPE: ^2x2Shape
Buildable:
Queue: Building
@@ -25,15 +23,16 @@ GAPOWR:
Range: 4c0
MaxHeightDelta: 3
WithIdleOverlay@LIGHTS:
RequiresCondition: !disabled
RequiresCondition: !empdisable
Sequence: idle-lights
WithIdleOverlay@PLUG:
PauseOnCondition: disabled
PauseOnCondition: empdisable
Sequence: idle-plug
Selectable:
Bounds: 90, 48, 0, -6
Power:
Amount: 100
RequiresCondition: !empdisable
PowerTooltip:
Targetable:
TargetTypes: Ground, Building, C4, SpyInfiltrate
@@ -43,11 +42,11 @@ GAPOWR:
Conditions:
powrup: powrup.a
Power@pluga:
RequiresCondition: powrup.a && !power-outage
RequiresCondition: !empdisable && powrup.a
Amount: 50
WithIdleOverlay@pluga:
RequiresCondition: powrup.a
PauseOnCondition: disabled
PauseOnCondition: empdisable
Sequence: idle-powrupa
Pluggable@plugb:
Offset: 1,1
@@ -55,10 +54,10 @@ GAPOWR:
powrup: powrup.b
WithIdleOverlay@plugb:
RequiresCondition: powrup.b
PauseOnCondition: disabled
PauseOnCondition: empdisable
Sequence: idle-powrupb
Power@plugb:
RequiresCondition: powrup.b && !power-outage
RequiresCondition: !empdisable && powrup.b
Amount: 50
ProvidesPrerequisite@buildingname:
SelectionDecorations:
@@ -302,7 +301,7 @@ GADEPT:
GARADR:
Inherits: ^Building
Inherits@IDISABLED: ^DisabledOverlay
Inherits@IDISABLED: ^DisableOnLowPowerOrPowerDown
Inherits@SHAPE: ^2x2Shape
Buildable:
Queue: Building
@@ -324,13 +323,8 @@ GARADR:
HP: 1000
Armor:
Type: Wood
RequiresPower:
CanPowerDown:
IndicatorPalette: mouse
PowerupSpeech: EnablePower
PowerdownSpeech: DisablePower
ProvidesRadar:
RequiresCondition: !disabled
RequiresCondition: !disabled && !empdisable
InfiltrateForExploration:
DetectCloaked:
Range: 10c0
@@ -340,18 +334,19 @@ GARADR:
MaxHeightDelta: 3
WithIdleOverlay@DISH:
Sequence: idle-dish
PauseOnCondition: disabled
PauseOnCondition: disabled || empdisable
Targetable:
TargetTypes: Ground, Building, C4, SpyInfiltrate
Power:
Amount: -50
RequiresCondition: !powerdown
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 96, 118, 0, -38
GATECH:
Inherits: ^Building
Inherits@IDISABLE: ^DisabledOverlay
Inherits@IDISABLED: ^DisableOnLowPower
Inherits@SHAPE: ^3x2Shape
Buildable:
Queue: Building
@@ -381,14 +376,13 @@ GATECH:
Sequence: idle-lights
Power:
Amount: -150
RequiresPower:
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 110, 60, 3, -4
GAPLUG:
Inherits: ^Building
Inherits@IDISABLE: ^DisabledOverlay
Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
Inherits@SHAPE: ^2x3Shape
Valued:
Cost: 1000
@@ -404,19 +398,14 @@ GAPLUG:
Building:
Footprint: xxx xxx
Dimensions: 2,3
RequiresPower:
CanPowerDown:
IndicatorPalette: mouse
PowerupSpeech: EnablePower
PowerdownSpeech: DisablePower
WithIdleOverlay@DISH:
PauseOnCondition: disabled
PauseOnCondition: disabled || empdisable
Sequence: idle-dish
WithIdleOverlay@LIGHTS:
RequiresCondition: !disabled
RequiresCondition: !disabled && !empdisable
Sequence: idle-lights
WithIdleOverlay@STRIP:
RequiresCondition: !disabled
RequiresCondition: !disabled && !empdisable
Sequence: idle-strip
Health:
HP: 1000
@@ -456,12 +445,13 @@ GAPLUG:
ExitsDebugOverlay:
SupportPowerChargeBar:
Power:
RequiresCondition: !powerdown
Amount: -150
Power@ioncannon:
RequiresCondition: plug.ioncannona || plug.ioncannonb
RequiresCondition: !powerdown && (plug.ioncannona || plug.ioncannonb)
Amount: -100
Power@hunterseeker:
RequiresCondition: plug.hunterseekera || plug.hunterseekerb
RequiresCondition: !powerdown && (plug.hunterseekera || plug.hunterseekerb)
Amount: -50
Pluggable@pluga:
Offset: 0,2

View File

@@ -37,7 +37,7 @@ GAGATE_B:
GACTWR:
Inherits: ^Defense
Inherits@IDISABLE: ^DisabledOverlay
Inherits@IDISABLE: ^DisableOnPowerDown
Inherits@AUTOTARGET: ^AutoTargetAll
-WithSpriteBody:
WithWallSpriteBody:
@@ -69,10 +69,6 @@ GACTWR:
InitialFacing: 224
AttackTurreted:
RequiresCondition: tower.vulcan || tower.rocket || tower.sam
CanPowerDown:
IndicatorPalette: mouse
PowerupSpeech: EnablePower
PowerdownSpeech: DisablePower
WithSpriteTurret@VULC:
RequiresCondition: tower.vulcan
Recoils: false
@@ -117,11 +113,12 @@ GACTWR:
Types: turret
Power@base:
Amount: -10
RequiresCondition: !powerdown
Power@turrets:
RequiresCondition: tower.vulcan || tower.rocket || tower.sam
RequiresCondition: (tower.vulcan || tower.rocket || tower.sam) && !powerdown
Amount: -20
Power@samextra:
RequiresCondition: tower.sam
RequiresCondition: tower.sam && !powerdown
Amount: -10
Pluggable:
Conditions:

View File

@@ -1,7 +1,5 @@
NAPOWR:
Inherits: ^Building
Inherits@IDISABLE: ^DisabledOverlay
Inherits@POWER_OUTAGE: ^DisabledByPowerOutage
Inherits@SHAPE: ^2x2Shape
Buildable:
Queue: Building
@@ -27,10 +25,11 @@ NAPOWR:
Range: 4c0
MaxHeightDelta: 3
WithIdleOverlay@LIGHTS:
RequiresCondition: !disabled
RequiresCondition: !empdisable
Sequence: idle-lights
Power:
Amount: 100
RequiresCondition: !empdisable
Targetable:
TargetTypes: Ground, Building, C4, SpyInfiltrate
ScalePowerWithHealth:
@@ -40,8 +39,6 @@ NAPOWR:
NAAPWR:
Inherits: ^Building
Inherits@IDISABLE: ^DisabledOverlay
Inherits@POWER_OUTAGE: ^DisabledByPowerOutage
Inherits@SHAPE: ^2x3Shape
Buildable:
Queue: Building
@@ -67,10 +64,11 @@ NAAPWR:
Range: 4c0
MaxHeightDelta: 3
WithIdleOverlay@LIGHTS:
RequiresCondition: !disabled
RequiresCondition: !empdisable
Sequence: idle-lights
Power:
Amount: 200
RequiresCondition: !empdisable
Targetable:
TargetTypes: Ground, Building, C4, SpyInfiltrate
ScalePowerWithHealth:
@@ -254,7 +252,7 @@ NAHPAD:
NARADR:
Inherits: ^Building
Inherits@IDISABLED: ^DisabledOverlay
Inherits@IDISABLED: ^DisableOnLowPowerOrPowerDown
Inherits@SHAPE: ^2x2Shape
Buildable:
Queue: Building
@@ -276,13 +274,8 @@ NARADR:
HP: 1000
Armor:
Type: Wood
RequiresPower:
CanPowerDown:
IndicatorPalette: mouse
PowerupSpeech: EnablePower
PowerdownSpeech: DisablePower
ProvidesRadar:
RequiresCondition: !disabled
RequiresCondition: !disabled && !empdisable
InfiltrateForExploration:
DetectCloaked:
Range: 10c0
@@ -292,18 +285,19 @@ NARADR:
MaxHeightDelta: 3
WithIdleOverlay@DISH:
Sequence: idle-dish
PauseOnCondition: disabled
PauseOnCondition: disabled || empdisable
Targetable:
TargetTypes: Ground, Building, C4, SpyInfiltrate
Power:
Amount: -40
RequiresCondition: !powerdown
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 96, 72, 0, -12
NATECH:
Inherits: ^Building
Inherits@IDISABLED: ^DisabledOverlay
Inherits@IDISABLED: ^DisableOnLowPower
Inherits@SHAPE: ^2x2Shape
Buildable:
Queue: Building
@@ -333,14 +327,13 @@ NATECH:
Sequence: idle-lights
Power:
Amount: -150
RequiresPower:
ProvidesPrerequisite@buildingname:
SelectionDecorations:
VisualBounds: 86, 58, 0, -4
NATMPL:
Inherits: ^Building
Inherits@IDISABLED: ^DisabledOverlay
Inherits@IDISABLED: ^DisableOnLowPowerOrPowerDown
Inherits@SHAPE: ^4x3Shape
HitShape:
TargetableOffsets: -1280,363,0
@@ -369,12 +362,12 @@ NATMPL:
MaxHeightDelta: 3
Power:
Amount: -200
RequiresPower:
RequiresCondition: !powerdown
WithIdleOverlay@LIGHTS:
RequiresCondition: !disabled
Sequence: idle-lights
ProduceActorPower:
PauseOnCondition: empdisable
PauseOnCondition: empdisable || disabled
Description: Hunter Seeker
LongDesc: Releases a drone that will acquire and destroy an enemy target.
Prerequisites: ~techlevel.superweapons

View File

@@ -37,7 +37,7 @@ NAGATE_B:
NAPOST:
Inherits: ^Building
Inherits@IDISABLED: ^DisabledOverlay
Inherits@IDISABLED: ^DisableOnLowPowerOrPowerDown
Buildable:
Queue: Defense
BuildPaletteOrder: 150
@@ -64,6 +64,7 @@ NAPOST:
Types: laserfencenode
Power:
Amount: -25
RequiresCondition: !powerdown
RevealsShroud:
Range: 4c0
WithIdleOverlay@LIGHTS:
@@ -72,11 +73,6 @@ NAPOST:
WithIdleOverlay@CHAINOFLIGHTS:
RequiresCondition: !disabled
Sequence: chainoflights
CanPowerDown:
IndicatorPalette: mouse
PowerupSpeech: EnablePower
PowerdownSpeech: DisablePower
RequiresPower:
LineBuildSegmentExternalCondition:
RequiresCondition: !disabled && !make-animation-playing
Condition: active-posts
@@ -136,7 +132,7 @@ NAFNCE:
NALASR:
Inherits: ^Defense
Inherits@IDISABLE: ^DisabledOverlay
Inherits@IDISABLE: ^DisableOnPowerDown
Inherits@AUTOTARGET: ^AutoTargetGround
Valued:
Cost: 300
@@ -170,6 +166,7 @@ NALASR:
WithVoxelTurret:
Power:
Amount: -40
RequiresCondition: !powerdown
SelectionDecorations:
VisualBounds: 40, 36, -8, -8
BodyOrientation:
@@ -177,7 +174,7 @@ NALASR:
NAOBEL:
Inherits: ^Defense
Inherits@IDISABLE: ^DisabledOverlay
Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
Inherits@AUTOTARGET: ^AutoTargetGround
Inherits@SHAPE: ^2x2Shape
Valued:
@@ -194,7 +191,6 @@ NAOBEL:
Dimensions: 2,2
Selectable:
Bounds: 88, 42, 0, -6
RequiresPower:
Health:
HP: 725
Armor:
@@ -205,10 +201,11 @@ NAOBEL:
Weapon: ObeliskLaserFire
LocalOffset: 1980,297,1131
AttackCharges:
RequiresCondition: !disabled
ChargeLevel: 65
ChargingCondition: charging
AmbientSound:
RequiresCondition: charging
RequiresCondition: charging && !disabled
SoundFiles: obelpowr.aud
Interval: 30, 40
WithChargeOverlay:
@@ -219,12 +216,13 @@ NAOBEL:
Sequence: idle-lights
Power:
Amount: -150
RequiresCondition: !powerdown
SelectionDecorations:
VisualBounds: 88, 72, 0, -12
NASAM:
Inherits: ^Defense
Inherits@IDISABLE: ^DisabledOverlay
Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
Inherits@AUTOTARGET: ^AutoTargetAir
Valued:
Cost: 500
@@ -237,7 +235,6 @@ NASAM:
Description: Nod Anti-Air base defense.\nRequires power to operate.\n Strong vs Aircraft\n Weak vs Ground units
Selectable:
Bounds: 40, 30, -3, -8
RequiresPower:
Health:
HP: 600
Armor:
@@ -250,6 +247,7 @@ NASAM:
TurnSpeed: 10
InitialFacing: 224
AttackTurreted:
RequiresCondition: !disabled
WithSpriteTurret:
Recoils: false
Armament:
@@ -257,12 +255,13 @@ NASAM:
LocalOffset: 543,0,815
Power:
Amount: -30
RequiresCondition: !powerdown
SelectionDecorations:
VisualBounds: 40, 36, -3, -8
NASTLH:
Inherits: ^Building
Inherits@IDISABLED: ^DisabledOverlay
Inherits@IDISABLED: ^DisableOnLowPowerOrPowerDown
Inherits@SHAPE: ^3x2Shape
HitShape:
TargetableOffsets: 250,0,0, 600,-864,0
@@ -293,11 +292,7 @@ NASTLH:
Type: cloakgenerator
Power:
Amount: -350
RequiresPower:
CanPowerDown:
PowerupSpeech: EnablePower
PowerdownSpeech: DisablePower
IndicatorPalette: mouse
RequiresCondition: !powerdown
ProximityExternalCondition:
RequiresCondition: !disabled
Condition: cloakgenerator
@@ -312,7 +307,7 @@ NASTLH:
NAMISL:
Inherits: ^Building
Inherits@IDISABLE: ^DisabledOverlay
Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
Inherits@SHAPE: ^2x2Shape
Buildable:
Queue: Defense
@@ -342,15 +337,11 @@ NAMISL:
Sequence: idle-lights
Power:
Amount: -50
CanPowerDown:
IndicatorPalette: mouse
PowerupSpeech: EnablePower
PowerdownSpeech: DisablePower
RequiresPower:
RequiresCondition: !powerdown
ProvidesPrerequisite@buildingname:
SupportPowerChargeBar:
NukePower:
PauseOnCondition: disabled
PauseOnCondition: empdisable || disabled
Cursor: nuke
Icon: clustermissile
ChargeTime: 540

View File

@@ -1,6 +1,6 @@
NAPULS:
Inherits: ^Defense
Inherits@IDISABLE: ^DisabledOverlay
Inherits@IDISABLE: ^DisableOnLowPowerOrPowerDown
Inherits@SHAPE: ^2x2Shape
Valued:
Cost: 1000
@@ -16,7 +16,6 @@ NAPULS:
Dimensions: 2,2
Selectable:
Bounds: 78, 54, 0, -12
RequiresPower:
Health:
HP: 500
Armor:
@@ -27,6 +26,7 @@ NAPULS:
TurnSpeed: 10
InitialFacing: 224
AttackTurreted:
RequiresCondition: !empdisable && !disabled
Armament:
Weapon: EMPulseCannon
LocalOffset: 212,0,1768
@@ -35,6 +35,7 @@ NAPULS:
Sequence: turret
Power:
Amount: -150
RequiresCondition: !powerdown
SelectionDecorations:
VisualBounds: 78, 54, 0, -12
RenderSprites: