Make pipes leak when destroyed (#20928)
This plugs a meta where atmos techs were fireaxing pipes to remove them without leaking their contents.
This commit is contained in:
@@ -21,12 +21,27 @@
|
||||
- type: Rotatable
|
||||
- type: Destructible
|
||||
thresholds:
|
||||
- trigger:
|
||||
- trigger: # for nukes
|
||||
!type:DamageTrigger
|
||||
damage: 100
|
||||
damage: 200
|
||||
behaviors:
|
||||
- !type:DoActsBehavior
|
||||
acts: ["Destruction"]
|
||||
- trigger: # regular damage trigger (replace with broken pipe)
|
||||
!type:DamageTrigger
|
||||
damage: 100
|
||||
behaviors:
|
||||
- !type:PlaySoundBehavior
|
||||
sound:
|
||||
path: /Audio/Effects/metalbreak.ogg
|
||||
- !type:SpawnEntitiesBehavior
|
||||
spawn:
|
||||
GasPipeBroken:
|
||||
min: 1
|
||||
max: 1
|
||||
offset: 0
|
||||
- !type:DoActsBehavior
|
||||
acts: ["Breakage"]
|
||||
- type: Sprite
|
||||
sprite: Structures/Piping/Atmospherics/pipe.rsi
|
||||
drawdepth: ThinPipe
|
||||
@@ -149,3 +164,28 @@
|
||||
- type: Construction
|
||||
graph: GasPipe
|
||||
node: fourway
|
||||
|
||||
- type: entity
|
||||
id: GasPipeBroken
|
||||
parent: GasPipeBase
|
||||
name: broken pipe
|
||||
description: It used to hold gas.
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Structures/Piping/Atmospherics/pipe.rsi
|
||||
drawdepth: ThinPipe
|
||||
state: pipeBroken
|
||||
layers:
|
||||
- state: pipeBroken
|
||||
map: [ "enum.PipeVisualLayers.Pipe" ]
|
||||
- type: Construction
|
||||
graph: GasPipe
|
||||
node: broken
|
||||
- type: Destructible
|
||||
thresholds: # override parent to avoid recursive destruction
|
||||
- trigger:
|
||||
!type:DamageTrigger
|
||||
damage: 100
|
||||
behaviors:
|
||||
- !type:DoActsBehavior
|
||||
acts: ["Destruction"]
|
||||
|
||||
@@ -113,3 +113,19 @@
|
||||
steps:
|
||||
- tool: Welding
|
||||
doAfter: 1
|
||||
|
||||
- node: broken
|
||||
entity: GasPipeBroken
|
||||
edges:
|
||||
- to: start
|
||||
conditions:
|
||||
- !type:EntityAnchored
|
||||
anchored: false
|
||||
completed:
|
||||
- !type:SpawnPrototype
|
||||
prototype: SheetSteel1
|
||||
amount: 1
|
||||
- !type:DeleteEntity
|
||||
steps:
|
||||
- tool: Welding
|
||||
doAfter: 1
|
||||
|
||||
Reference in New Issue
Block a user