diff --git a/Resources/Prototypes/Entities/Structures/Machines/frame.yml b/Resources/Prototypes/Entities/Structures/Machines/frame.yml index 4ac69da524..f51b4aea23 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/frame.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/frame.yml @@ -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 \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Structures/Power/substation.yml b/Resources/Prototypes/Entities/Structures/Power/substation.yml index e7434f42fc..c84f7b0271 100644 --- a/Resources/Prototypes/Entities/Structures/Power/substation.yml +++ b/Resources/Prototypes/Entities/Structures/Power/substation.yml @@ -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 \ No newline at end of file diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/machines/machine.yml b/Resources/Prototypes/Recipes/Construction/Graphs/machines/machine.yml index b5ad5d548f..c3d62547dd 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/machines/machine.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/machines/machine.yml @@ -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 {} diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/railing.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/railing.yml similarity index 100% rename from Resources/Prototypes/Recipes/Construction/Graphs/railing.yml rename to Resources/Prototypes/Recipes/Construction/Graphs/structures/railing.yml diff --git a/Resources/Prototypes/Recipes/Construction/machines.yml b/Resources/Prototypes/Recipes/Construction/machines.yml index 5853767457..0582a223dd 100644 --- a/Resources/Prototypes/Recipes/Construction/machines.yml +++ b/Resources/Prototypes/Recipes/Construction/machines.yml @@ -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" \ No newline at end of file diff --git a/Resources/Textures/Structures/Machines/parts.rsi/destroyed.png b/Resources/Textures/Structures/Machines/parts.rsi/destroyed.png new file mode 100644 index 0000000000..1a95fae972 Binary files /dev/null and b/Resources/Textures/Structures/Machines/parts.rsi/destroyed.png differ diff --git a/Resources/Textures/Structures/Machines/parts.rsi/meta.json b/Resources/Textures/Structures/Machines/parts.rsi/meta.json index 3071772281..1774c49214 100644 --- a/Resources/Textures/Structures/Machines/parts.rsi/meta.json +++ b/Resources/Textures/Structures/Machines/parts.rsi/meta.json @@ -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" } ] }