Change over solar panel breakage to use more construction graphs (#5395)
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
- type: entity
|
||||
id: SolarPanel
|
||||
id: SolarPanelBasePhysSprite
|
||||
abstract: true
|
||||
name: solar panel
|
||||
placement:
|
||||
mode: SnapgridCenter
|
||||
components:
|
||||
- type: Clickable
|
||||
- type: InteractionOutline
|
||||
- type: Transform
|
||||
anchored: true
|
||||
- type: Physics
|
||||
bodyType: Static
|
||||
fixtures:
|
||||
@@ -32,13 +35,18 @@
|
||||
output:
|
||||
!type:CableDeviceNode
|
||||
nodeGroupID: HVPower
|
||||
- type: Anchorable
|
||||
- type: Pullable
|
||||
|
||||
- type: entity
|
||||
id: SolarPanel
|
||||
parent: SolarPanelBasePhysSprite
|
||||
name: solar panel
|
||||
components:
|
||||
- type: PowerSupplier
|
||||
supplyRampTolerance: 500
|
||||
supplyRampRate: 500
|
||||
- type: SolarPanel
|
||||
supply: 1500
|
||||
- type: Transform
|
||||
anchored: true
|
||||
- type: Damageable
|
||||
damageContainer: Inorganic
|
||||
damageModifierSet: Metallic
|
||||
@@ -48,14 +56,48 @@
|
||||
!type:DamageTrigger
|
||||
damage: 100
|
||||
behaviors:
|
||||
- !type:PlaySoundBehavior
|
||||
sound:
|
||||
collection: GlassBreak
|
||||
- !type:ChangeConstructionNodeBehavior
|
||||
node: solarpanel_broken
|
||||
- !type:DoActsBehavior
|
||||
acts: ["Breakage"]
|
||||
- type: Anchorable
|
||||
- type: Pullable
|
||||
- type: Construction
|
||||
graph: solarpanel
|
||||
node: solarpanel
|
||||
|
||||
- type: entity
|
||||
id: SolarPanelBroken
|
||||
parent: SolarPanelBasePhysSprite
|
||||
name: solar panel
|
||||
suffix: Broken
|
||||
components:
|
||||
- type: Sprite
|
||||
state: broken
|
||||
- type: Damageable
|
||||
damageContainer: Inorganic
|
||||
damageModifierSet: Metallic
|
||||
- type: Destructible
|
||||
thresholds:
|
||||
- trigger:
|
||||
!type:DamageTrigger
|
||||
damage: 50
|
||||
behaviors:
|
||||
- !type:PlaySoundBehavior
|
||||
sound:
|
||||
collection: GlassBreak
|
||||
- !type:SpawnEntitiesBehavior
|
||||
spawn:
|
||||
ShardGlass:
|
||||
min: 1
|
||||
max: 2
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- type: Construction
|
||||
graph: solarpanel
|
||||
node: solarpanel_broken
|
||||
|
||||
- type: entity
|
||||
id: SolarAssembly
|
||||
name: solar assembly
|
||||
@@ -69,7 +111,8 @@
|
||||
bodyType: Static
|
||||
fixtures:
|
||||
- shape:
|
||||
!type:PhysShapeAabb {}
|
||||
!type:PhysShapeCircle
|
||||
radius: 0.25
|
||||
mass: 75
|
||||
mask:
|
||||
- VaultImpassable
|
||||
|
||||
@@ -59,6 +59,8 @@
|
||||
edges:
|
||||
- to: solarassembly
|
||||
completed:
|
||||
- !type:SnapToGrid
|
||||
southRotation: true
|
||||
- !type:SpawnPrototype
|
||||
prototype: SheetGlass1
|
||||
amount: 2
|
||||
@@ -68,12 +70,31 @@
|
||||
steps:
|
||||
- tool: Prying
|
||||
doAfter: 0.5
|
||||
|
||||
|
||||
- node: solarpanel_broken
|
||||
entity: SolarPanelBroken
|
||||
edges:
|
||||
- to: solarassembly
|
||||
completed:
|
||||
- !type:SnapToGrid
|
||||
southRotation: true
|
||||
- !type:SpawnPrototype
|
||||
prototype: ShardGlass
|
||||
amount: 2
|
||||
conditions:
|
||||
- !type:EntityAnchored
|
||||
anchored: true
|
||||
steps:
|
||||
- tool: Prying
|
||||
doAfter: 0.5
|
||||
|
||||
- node: solartracker
|
||||
entity: SolarTracker
|
||||
edges:
|
||||
- to: solarassembly
|
||||
completed:
|
||||
- !type:SnapToGrid
|
||||
southRotation: true
|
||||
- !type:SpawnPrototype
|
||||
prototype: SheetGlass1
|
||||
amount: 2
|
||||
|
||||
Reference in New Issue
Block a user