Replace BreakableConstructionComponent with a destructible threshold behavior (#3111)

* Replace BreakableConstructionComponent with ChangeConstructionNodeBehavior

* Fix ordering of behaviors in MachineFrame
This commit is contained in:
Vera Aguilera Puerto
2021-02-09 20:08:06 +01:00
committed by GitHub
8 changed files with 90 additions and 51 deletions

View File

@@ -102,10 +102,10 @@
!type:DamageTrigger
damage: 100
behaviors:
- !type:ChangeConstructionNodeBehavior
node: monitorBroken
- !type:DoActsBehavior
acts: ["Destruction"]
- type: BreakableConstruction
node: monitorBroken
- type: Sprite
sprite: Constructible/Power/computers.rsi
layers:

View File

@@ -54,8 +54,18 @@
- type: Construction
graph: machine
node: machine
- type: BreakableConstruction
node: machineFrame
- type: Damageable
resistances: metallicResistances
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 100
behaviors:
- !type:ChangeConstructionNodeBehavior
node: machineFrame
- !type:DoActsBehavior
acts: ["Destruction"]
- type: Machine
board: AutolatheMachineCircuitboard
- type: Wires
@@ -109,8 +119,18 @@
- type: Construction
graph: machine
node: machine
- type: BreakableConstruction
node: machineFrame
- type: Damageable
resistances: metallicResistances
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 100
behaviors:
- !type:ChangeConstructionNodeBehavior
node: machineFrame
- !type:DoActsBehavior
acts: ["Destruction"]
- type: Machine
board: ProtolatheMachineCircuitboard
- type: Wires

View File

@@ -28,8 +28,18 @@
- type: Construction
graph: machine
node: missingWires
- type: BreakableConstruction
node: start
- type: Damageable
resistances: metallicResistances
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 100
behaviors:
- !type:ChangeConstructionNodeBehavior
node: start
- !type:DoActsBehavior
acts: ["Destruction"]
- type: Sprite
sprite: "Constructible/Misc/stock_parts.rsi"
state: "box_0"
@@ -64,8 +74,18 @@
- type: Construction
graph: machine
node: machineFrame
- type: BreakableConstruction
node: missingWires
- type: Damageable
resistances: metallicResistances
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 100
behaviors:
- !type:ChangeConstructionNodeBehavior
node: missingWires
- !type:DoActsBehavior
acts: ["Destruction"]
- type: MachineFrame
- type: Sprite
netsync: false

View File

@@ -33,10 +33,10 @@
!type:DamageTrigger
damage: 100
behaviors:
- !type:ChangeConstructionNodeBehavior
node: start
- !type:DoActsBehavior
acts: ["Destruction"]
- type: BreakableConstruction
node: start
- type: SnapGrid
offset: Center
- type: Climbable

View File

@@ -370,10 +370,10 @@
!type:DamageTrigger
damage: 600
behaviors:
- !type:ChangeConstructionNodeBehavior
node: girder
- !type:DoActsBehavior
acts: ["Destruction"]
- type: BreakableConstruction
node: girder
- type: ReinforcedWall
key: walls
base: solid
@@ -488,6 +488,10 @@
!type:DamageTrigger
damage: 300
behaviors:
- !type:PlaySoundBehavior
sound: /Audio/Effects/metalbreak.ogg
- !type:ChangeConstructionNodeBehavior
node: girder
- !type:DoActsBehavior
acts: ["Destruction"]
- type: BreakableConstruction