diff --git a/Content.Server/Destructible/DestructibleSystem.cs b/Content.Server/Destructible/DestructibleSystem.cs index e4cd326978..53b9da9132 100644 --- a/Content.Server/Destructible/DestructibleSystem.cs +++ b/Content.Server/Destructible/DestructibleSystem.cs @@ -41,6 +41,10 @@ namespace Content.Server.Destructible threshold.Execute(uid, this, EntityManager); } + + // if destruction behavior (or some other deletion effect) occurred, don't run other triggers. + if (EntityManager.IsQueuedForDeletion(uid) || Deleted(uid)) + return; } } } diff --git a/Resources/Prototypes/Entities/Objects/Power/lights.yml b/Resources/Prototypes/Entities/Objects/Power/lights.yml index f2573b43a5..2089d86e44 100644 --- a/Resources/Prototypes/Entities/Objects/Power/lights.yml +++ b/Resources/Prototypes/Entities/Objects/Power/lights.yml @@ -21,6 +21,12 @@ Blunt: 5 - type: Destructible thresholds: + - trigger: + !type:DamageTrigger + damage: 100 + behaviors: #excess damage (nuke?). avoid computational cost of spawning entities. + - !type:DoActsBehavior + acts: [ "Destruction" ] - trigger: !type:DamageTrigger damage: 5 diff --git a/Resources/Prototypes/Entities/Structures/Doors/Windoors/base_structurewindoors.yml b/Resources/Prototypes/Entities/Structures/Doors/Windoors/base_structurewindoors.yml index 353beaa850..17c8d861d6 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Windoors/base_structurewindoors.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Windoors/base_structurewindoors.yml @@ -43,6 +43,12 @@ damageModifierSet: Glass - type: Destructible thresholds: + - trigger: + !type:DamageTrigger + damage: 400 + behaviors: #excess damage (nuke?). avoid computational cost of spawning entities. + - !type:DoActsBehavior + acts: [ "Destruction" ] - trigger: !type:DamageTrigger damage: 200 @@ -122,6 +128,12 @@ visible: false - type: Destructible thresholds: + - trigger: + !type:DamageTrigger + damage: 600 + behaviors: #excess damage (nuke?). avoid computational cost of spawning entities. + - !type:DoActsBehavior + acts: [ "Destruction" ] - trigger: !type:DamageTrigger damage: 400 diff --git a/Resources/Prototypes/Entities/Structures/Piping/Disposal/pipes.yml b/Resources/Prototypes/Entities/Structures/Piping/Disposal/pipes.yml index c8b9a0d0a3..1f0a90ef86 100644 --- a/Resources/Prototypes/Entities/Structures/Piping/Disposal/pipes.yml +++ b/Resources/Prototypes/Entities/Structures/Piping/Disposal/pipes.yml @@ -24,7 +24,13 @@ thresholds: - trigger: !type:DamageTrigger - damage: 100 + damage: 100 #excess damage (nuke?). avoid computational cost of spawning entities. + behaviors: + - !type:DoActsBehavior + acts: ["Destruction"] + - trigger: + !type:DamageTrigger + damage: 50 behaviors: - !type:DoActsBehavior acts: ["Breakage"] diff --git a/Resources/Prototypes/Entities/Structures/Power/cables.yml b/Resources/Prototypes/Entities/Structures/Power/cables.yml index 29fce36d55..ad7e73a1bb 100644 --- a/Resources/Prototypes/Entities/Structures/Power/cables.yml +++ b/Resources/Prototypes/Entities/Structures/Power/cables.yml @@ -26,7 +26,7 @@ thresholds: - trigger: !type:DamageTrigger - damage: 100 + damage: 50 behaviors: - !type:DoActsBehavior acts: ["Destruction"] @@ -68,6 +68,12 @@ - trigger: !type:DamageTrigger damage: 100 + behaviors: #excess damage (nuke?). avoid computational cost of spawning entities. + - !type:DoActsBehavior + acts: [ "Destruction" ] + - trigger: + !type:DamageTrigger + damage: 50 behaviors: - !type:SpawnEntitiesBehavior spawn: @@ -109,6 +115,12 @@ - trigger: !type:DamageTrigger damage: 100 + behaviors: #excess damage (nuke?). avoid computational cost of spawning entities. + - !type:DoActsBehavior + acts: [ "Destruction" ] + - trigger: + !type:DamageTrigger + damage: 50 behaviors: - !type:SpawnEntitiesBehavior spawn: @@ -153,6 +165,12 @@ - trigger: !type:DamageTrigger damage: 100 + behaviors: #excess damage (nuke?). avoid computational cost of spawning entities. + - !type:DoActsBehavior + acts: [ "Destruction" ] + - trigger: + !type:DamageTrigger + damage: 50 behaviors: - !type:SpawnEntitiesBehavior spawn: diff --git a/Resources/Prototypes/Entities/Structures/Walls/grille.yml b/Resources/Prototypes/Entities/Structures/Walls/grille.yml index 231a391f95..91bf83b81d 100644 --- a/Resources/Prototypes/Entities/Structures/Walls/grille.yml +++ b/Resources/Prototypes/Entities/Structures/Walls/grille.yml @@ -55,6 +55,12 @@ - SmallImpassable - type: Destructible thresholds: + - trigger: + !type:DamageTrigger + damage: 50 #excess damage (nuke?). avoid computational cost of spawning entities. + behaviors: + - !type:DoActsBehavior + acts: ["Destruction"] - trigger: !type:DamageTrigger damage: 20 diff --git a/Resources/Prototypes/Entities/Structures/Walls/walls.yml b/Resources/Prototypes/Entities/Structures/Walls/walls.yml index c07b433ba2..9384af5fe6 100644 --- a/Resources/Prototypes/Entities/Structures/Walls/walls.yml +++ b/Resources/Prototypes/Entities/Structures/Walls/walls.yml @@ -346,6 +346,12 @@ node: reinforcedWall - type: Destructible thresholds: + - trigger: + !type:DamageTrigger + damage: 1200 #excess damage (nuke?). avoid computational cost of spawning entities. + behaviors: + - !type:DoActsBehavior + acts: ["Destruction"] - trigger: !type:DamageTrigger damage: 600 @@ -471,6 +477,12 @@ sprite: Structures/Walls/solid.rsi - type: Destructible thresholds: + - trigger: + !type:DamageTrigger + damage: 600 # #excess damage (nuke?). avoid computational cost of spawning entities. + behaviors: + - !type:DoActsBehavior + acts: ["Destruction"] - trigger: !type:DamageTrigger damage: 300 diff --git a/Resources/Prototypes/Entities/Structures/Windows/reinforced.yml b/Resources/Prototypes/Entities/Structures/Windows/reinforced.yml index 82466829cc..04d5b847f9 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/reinforced.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/reinforced.yml @@ -13,6 +13,12 @@ doAfterDelay: 2 - type: Destructible thresholds: + - trigger: + !type:DamageTrigger + damage: 300 #excess damage (nuke?). Avoid computational cost of spawning entities. + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] - trigger: !type:DamageTrigger damage: 150 diff --git a/Resources/Prototypes/Entities/Structures/Windows/window.yml b/Resources/Prototypes/Entities/Structures/Windows/window.yml index 50a4550fa6..a15585e426 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/window.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/window.yml @@ -38,6 +38,12 @@ - type: Repairable - type: Destructible thresholds: + - trigger: + !type:DamageTrigger + damage: 150 #excess damage (nuke?). avoid computational cost of spawning entities. + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] - trigger: !type:DamageTrigger damage: 50