From 9bc37e9d88bc7115546163e98e54e79dffc451a8 Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Sat, 19 Mar 2022 23:55:25 +1300 Subject: [PATCH] Make more entities destructible (#7193) --- .../Objects/Materials/Sheets/glass.yml | 22 +++++++++++++++++++ .../Objects/Materials/Sheets/metal.yml | 8 +++++++ .../Objects/Materials/Sheets/other.yml | 8 +++++++ .../Entities/Objects/Materials/ingots.yml | 8 +++++++ .../Entities/Objects/Materials/materials.yml | 8 +++++++ .../Entities/Objects/Materials/ore.yml | 8 +++++++ .../Entities/Objects/Materials/parts.yml | 8 +++++++ .../Entities/Objects/Materials/shards.yml | 8 +++++++ .../Entities/Objects/Misc/tiles.yml | 8 +++++++ .../Entities/Structures/catwalk.yml | 19 ++++++++++++++++ .../Entities/Structures/conveyor.yml | 17 ++++++++++++++ 11 files changed, 122 insertions(+) diff --git a/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml b/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml index 44f061d52f..54ae18e5b0 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml @@ -14,6 +14,28 @@ tags: - Sheet - DroneUsable + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 100 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - trigger: + !type:DamageTrigger + damage: 50 + behaviors: + - !type:PlaySoundBehavior + sound: + collection: GlassBreak + - !type:SpawnEntitiesBehavior + spawn: + ShardGlass: + min: 0 + max: 1 + - !type:DoActsBehavior + acts: [ "Destruction" ] - type: entity parent: SheetGlassBase diff --git a/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml b/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml index e196b9191c..7fbc87ad34 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml @@ -15,6 +15,14 @@ - Sheet - Metal - DroneUsable + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 100 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] - type: entity parent: SheetMetalBase diff --git a/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml b/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml index 8daadea75d..9ffd09fa38 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml @@ -14,6 +14,14 @@ tags: - Sheet - DroneUsable + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 100 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] - type: entity parent: SheetOtherBase diff --git a/Resources/Prototypes/Entities/Objects/Materials/ingots.yml b/Resources/Prototypes/Entities/Objects/Materials/ingots.yml index f75e488975..8a79eb7021 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/ingots.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/ingots.yml @@ -13,6 +13,14 @@ - type: Tag tags: - Ingot + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 500 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] - type: entity parent: IngotBase diff --git a/Resources/Prototypes/Entities/Objects/Materials/materials.yml b/Resources/Prototypes/Entities/Objects/Materials/materials.yml index 4990f4bf6f..b6ae5042b8 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/materials.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/materials.yml @@ -13,6 +13,14 @@ - type: Tag tags: - DroneUsable + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 100 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] - type: entity parent: MaterialBase diff --git a/Resources/Prototypes/Entities/Objects/Materials/ore.yml b/Resources/Prototypes/Entities/Objects/Materials/ore.yml index 0e284df679..3f1d4d56dd 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/ore.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/ore.yml @@ -13,6 +13,14 @@ - type: Tag tags: - Ore + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 200 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] - type: entity parent: OreBase diff --git a/Resources/Prototypes/Entities/Objects/Materials/parts.yml b/Resources/Prototypes/Entities/Objects/Materials/parts.yml index 3d09134558..761634abb0 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/parts.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/parts.yml @@ -13,6 +13,14 @@ - type: Tag tags: - DroneUsable + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 100 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] - type: entity parent: PartBase diff --git a/Resources/Prototypes/Entities/Objects/Materials/shards.yml b/Resources/Prototypes/Entities/Objects/Materials/shards.yml index cc4b1cf34c..2496713f02 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/shards.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/shards.yml @@ -28,6 +28,14 @@ - Recyclable - Trash - type: Recyclable + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 100 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] - type: entity parent: ShardBase diff --git a/Resources/Prototypes/Entities/Objects/Misc/tiles.yml b/Resources/Prototypes/Entities/Objects/Misc/tiles.yml index e821684a22..cb7cc5fbad 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/tiles.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/tiles.yml @@ -18,6 +18,14 @@ - type: Tag tags: - DroneUsable + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 100 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] - type: entity name: steel tile diff --git a/Resources/Prototypes/Entities/Structures/catwalk.yml b/Resources/Prototypes/Entities/Structures/catwalk.yml index dcf3f65ecf..124f0d5e9a 100644 --- a/Resources/Prototypes/Entities/Structures/catwalk.yml +++ b/Resources/Prototypes/Entities/Structures/catwalk.yml @@ -33,3 +33,22 @@ - type: Construction graph: Catwalk node: Catwalk + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 500 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - trigger: + !type:DamageTrigger + damage: 200 + behaviors: + - !type:SpawnEntitiesBehavior + spawn: + PartRodMetal: # takes two to construct, so drop less than that + min: 0 + max: 1 + - !type:DoActsBehavior + acts: [ "Destruction" ] \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Structures/conveyor.yml b/Resources/Prototypes/Entities/Structures/conveyor.yml index 8a662675a2..db7ac3a15e 100644 --- a/Resources/Prototypes/Entities/Structures/conveyor.yml +++ b/Resources/Prototypes/Entities/Structures/conveyor.yml @@ -33,6 +33,15 @@ - type: Construction graph: ConveyorGraph node: entity + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 200 + behaviors: + # if ConveyorBeltAssembly becomes craftable, maybe spawn some of the ingredients? + - !type:DoActsBehavior + acts: [ "Destruction" ] - type: entity id: ConveyorBeltAssembly @@ -79,3 +88,11 @@ - type: Construction graph: LeverGraph node: lever + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 100 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] \ No newline at end of file