Substations now explode when destroyed (#5729)

* Substation destructible component

Substations now explode and create a destroyed machine which can be deconstructed.

* construction graph test failed

Does not need a path from start to finish but adding anyway to fix tests

* railing to structures

* Fixed Review

Updated parent to fix most comments.
Updated node to camelcase

* Updated target node graph

Still recovering...

* Final fix of graph

I swear

* Altered destroyed machine spawns

Removed HV cable and reduced steel sheets.
This commit is contained in:
Peptide90
2022-01-01 16:51:56 +00:00
committed by GitHub
parent 81607d0327
commit f88358a12a
7 changed files with 89 additions and 1 deletions

View File

@@ -105,3 +105,37 @@
- type: Appearance
visuals:
- type: MachineFrameVisualizer
- type: entity
id: MachineFrameDestroyed
parent: BaseStructureDynamic
name: destroyed machine frame
placement:
mode: SnapgridCenter
components:
- type: Transform
anchored: true
- type: Construction
graph: machine
node: destroyedMachineFrame
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 100
behaviors:
- !type:SpawnEntitiesBehavior
spawn:
SheetSteel1:
min: 1
max: 3
- !type:DoActsBehavior
acts: ["Destruction"]
- type: Sprite
netsync: false
sprite: Structures/Machines/parts.rsi
state: destroyed

View File

@@ -42,3 +42,25 @@
maxChargeRate: 5000
supplyRampTolerance: 5000
supplyRampRate: 1000
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 100
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- !type:PlaySoundBehavior
sound:
path: /Audio/Effects/metalbreak.ogg
- !type:ExplodeBehavior
- !type:SpawnEntitiesBehavior #in future should also emit a cloud of hot gas
spawn:
MachineFrameDestroyed:
min: 1
max: 1
- type: Explosive
devastationRange: 1
heavyImpactRange: 3
lightImpactRange: 5
flashRange: 6

View File

@@ -16,6 +16,11 @@
- material: Steel
amount: 5
doAfter: 2.5
- to: destroyedMachineFrame
steps:
- material: Steel
amount: 5
doAfter: 2.5
- node: missingWires
entity: UnfinishedMachineFrame
@@ -98,3 +103,15 @@
- tool: Prying
doAfter: 0.25
- node: destroyedMachineFrame
entity: MachineFrameDestroyed
edges:
- to: start
steps:
- tool: Welding
doAfter: 5
completed:
- !type:SpawnPrototype
prototype: SheetSteel1
amount: 3
- !type:DeleteEntity {}

View File

@@ -23,3 +23,15 @@
icon:
sprite: Structures/Machines/parts.rsi
state: "box_0"
- type: construction
name: destroyed machine frame
id: MachineFrameDestroyed
graph: machine
startNode: start
targetNode: destroyedMachineFrame
placementMode: SnapgridCenter
canBuildInImpassable: false
icon:
sprite: Structures/Machines/parts.rsi
state: "destroyed"

Binary file not shown.

After

Width:  |  Height:  |  Size: 903 B

View File

@@ -5,7 +5,7 @@
"y": 32
},
"license": "CC-BY-SA-3.0",
"copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/0d9c9a8233dfc3fc55edc538955a761a6328bee0",
"copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/0d9c9a8233dfc3fc55edc538955a761a6328bee0, destroyed modified by Peptide90",
"states": [
{
"name": "0",
@@ -47,6 +47,9 @@
},
{
"name": "vbox_3"
},
{
"name": "destroyed"
}
]
}