From d2377df81f97ad2fcbd9016b8cd16611af4d53e1 Mon Sep 17 00:00:00 2001 From: Peptide90 <78795277+Peptide90@users.noreply.github.com> Date: Fri, 3 Jun 2022 11:10:18 +0100 Subject: [PATCH] adds destructible to power structures (#8536) --- .../Power/Generation/generators.yml | 3 +++ .../Entities/Structures/Power/apc.yml | 22 +++++++++++++++++++ .../Entities/Structures/Power/substation.yml | 9 ++++++++ 3 files changed, 34 insertions(+) diff --git a/Resources/Prototypes/Entities/Structures/Power/Generation/generators.yml b/Resources/Prototypes/Entities/Structures/Power/Generation/generators.yml index b606d1444a..52b1bfd548 100644 --- a/Resources/Prototypes/Entities/Structures/Power/Generation/generators.yml +++ b/Resources/Prototypes/Entities/Structures/Power/Generation/generators.yml @@ -45,6 +45,9 @@ supplyRampTolerance: 500 - type: Anchorable - type: Pullable + - type: Damageable + damageContainer: Inorganic + damageModifierSet: Metallic - type: Destructible thresholds: - trigger: diff --git a/Resources/Prototypes/Entities/Structures/Power/apc.yml b/Resources/Prototypes/Entities/Structures/Power/apc.yml index 49fa9af4f7..33904b256a 100644 --- a/Resources/Prototypes/Entities/Structures/Power/apc.yml +++ b/Resources/Prototypes/Entities/Structures/Power/apc.yml @@ -69,3 +69,25 @@ supplyRampTolerance: 1000 supplyRampRate: 500 - type: WallMount + - type: Damageable + damageContainer: Inorganic + damageModifierSet: Metallic + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 200 + behaviors: #excess damage, don't spawn entities. + - !type:DoActsBehavior + acts: [ "Destruction" ] + - trigger: + !type:DamageTrigger + damage: 50 + behaviors: + - !type:SpawnEntitiesBehavior + spawn: + SheetSteel1: + min: 1 + max: 1 + - !type:DoActsBehavior + acts: [ "Destruction" ] diff --git a/Resources/Prototypes/Entities/Structures/Power/substation.yml b/Resources/Prototypes/Entities/Structures/Power/substation.yml index d492cd076d..d65dfbf7f6 100644 --- a/Resources/Prototypes/Entities/Structures/Power/substation.yml +++ b/Resources/Prototypes/Entities/Structures/Power/substation.yml @@ -138,6 +138,9 @@ maxChargeRate: 5000 supplyRampTolerance: 5000 supplyRampRate: 1000 + - type: Damageable + damageContainer: Inorganic + damageModifierSet: Metallic - type: Destructible thresholds: - trigger: @@ -146,9 +149,15 @@ behaviors: - !type:DoActsBehavior acts: ["Destruction"] + - !type:ExplodeBehavior - !type:PlaySoundBehavior sound: path: /Audio/Effects/metalbreak.ogg + - type: Explosive + explosionType: Default + maxIntensity: 50 + intensitySlope: 2 + totalIntensity: 100 # Substations in use