diff --git a/Content.IntegrationTests/Tests/Destructible/DestructibleDamageClassTest.cs b/Content.IntegrationTests/Tests/Destructible/DestructibleDamageClassTest.cs index b7fe431931..b0b88e91f3 100644 --- a/Content.IntegrationTests/Tests/Destructible/DestructibleDamageClassTest.cs +++ b/Content.IntegrationTests/Tests/Destructible/DestructibleDamageClassTest.cs @@ -12,11 +12,12 @@ using static Content.IntegrationTests.Tests.Destructible.DestructibleTestPrototy namespace Content.IntegrationTests.Tests.Destructible { [TestFixture] - [TestOf(typeof(TotalDamageClassesTrigger))] + [TestOf(typeof(DamageClassTrigger))] + [TestOf(typeof(AndTrigger))] public class DestructibleDamageClassTest : ContentIntegrationTest { [Test] - public async Task Test() + public async Task AndTest() { var server = StartServerDummyTicker(new ServerContentIntegrationOption { @@ -82,7 +83,12 @@ namespace Content.IntegrationTests.Tests.Destructible Assert.That(threshold.Behaviors, Is.Empty); Assert.NotNull(threshold.Trigger); Assert.That(threshold.Triggered, Is.True); - Assert.IsInstanceOf(threshold.Trigger); + Assert.IsInstanceOf(threshold.Trigger); + + var trigger = (AndTrigger) threshold.Trigger; + + Assert.IsInstanceOf(trigger.Triggers[0]); + Assert.IsInstanceOf(trigger.Triggers[1]); sThresholdListenerComponent.ThresholdsReached.Clear(); @@ -139,7 +145,12 @@ namespace Content.IntegrationTests.Tests.Destructible Assert.That(threshold.Behaviors, Is.Empty); Assert.NotNull(threshold.Trigger); Assert.That(threshold.Triggered, Is.True); - Assert.IsInstanceOf(threshold.Trigger); + Assert.IsInstanceOf(threshold.Trigger); + + trigger = (AndTrigger) threshold.Trigger; + + Assert.IsInstanceOf(trigger.Triggers[0]); + Assert.IsInstanceOf(trigger.Triggers[1]); sThresholdListenerComponent.ThresholdsReached.Clear(); diff --git a/Content.IntegrationTests/Tests/Destructible/DestructibleDamageTypeTest.cs b/Content.IntegrationTests/Tests/Destructible/DestructibleDamageTypeTest.cs index 3ecbacfa30..0a7c0a623f 100644 --- a/Content.IntegrationTests/Tests/Destructible/DestructibleDamageTypeTest.cs +++ b/Content.IntegrationTests/Tests/Destructible/DestructibleDamageTypeTest.cs @@ -12,7 +12,8 @@ using static Content.IntegrationTests.Tests.Destructible.DestructibleTestPrototy namespace Content.IntegrationTests.Tests.Destructible { [TestFixture] - [TestOf(typeof(TotalDamageTypesTrigger))] + [TestOf(typeof(DamageTypeTrigger))] + [TestOf(typeof(AndTrigger))] public class DestructibleDamageTypeTest : ContentIntegrationTest { [Test] @@ -82,7 +83,12 @@ namespace Content.IntegrationTests.Tests.Destructible Assert.That(threshold.Behaviors, Is.Empty); Assert.NotNull(threshold.Trigger); Assert.That(threshold.Triggered, Is.True); - Assert.IsInstanceOf(threshold.Trigger); + Assert.IsInstanceOf(threshold.Trigger); + + var trigger = (AndTrigger) threshold.Trigger; + + Assert.IsInstanceOf(trigger.Triggers[0]); + Assert.IsInstanceOf(trigger.Triggers[1]); sThresholdListenerComponent.ThresholdsReached.Clear(); @@ -139,7 +145,12 @@ namespace Content.IntegrationTests.Tests.Destructible Assert.That(threshold.Behaviors, Is.Empty); Assert.NotNull(threshold.Trigger); Assert.That(threshold.Triggered, Is.True); - Assert.IsInstanceOf(threshold.Trigger); + Assert.IsInstanceOf(threshold.Trigger); + + trigger = (AndTrigger) threshold.Trigger; + + Assert.IsInstanceOf(trigger.Triggers[0]); + Assert.IsInstanceOf(trigger.Triggers[1]); sThresholdListenerComponent.ThresholdsReached.Clear(); diff --git a/Content.IntegrationTests/Tests/Destructible/DestructibleTestPrototypes.cs b/Content.IntegrationTests/Tests/Destructible/DestructibleTestPrototypes.cs index 32fb9048e8..27e72e74b0 100644 --- a/Content.IntegrationTests/Tests/Destructible/DestructibleTestPrototypes.cs +++ b/Content.IntegrationTests/Tests/Destructible/DestructibleTestPrototypes.cs @@ -21,11 +21,11 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 20 triggersOnce: false - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 50 triggersOnce: false behaviors: @@ -48,7 +48,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 50 behaviors: - !type:PlaySoundBehavior @@ -70,13 +70,16 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTypesTrigger - damage: - Blunt: 10 - Slash: 10 + !type:AndTrigger + triggers: + - !type:DamageTypeTrigger + type: Blunt + damage: 10 + - !type:DamageTypeTrigger + type: Slash + damage: 10 - type: TestThresholdListener - - type: entity id: {DestructibleDamageClassEntityId} name: {DestructibleDamageClassEntityId} @@ -85,10 +88,14 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageClassesTrigger - damage: - Brute: 10 - Burn: 10 + !type:AndTrigger + triggers: + - !type:DamageClassTrigger + class: Brute + damage: 10 + - !type:DamageClassTrigger + class: Burn + damage: 10 - type: TestThresholdListener"; } } diff --git a/Content.IntegrationTests/Tests/Destructible/DestructibleThresholdActivationTest.cs b/Content.IntegrationTests/Tests/Destructible/DestructibleThresholdActivationTest.cs index 55c1aeadbb..70c2668a61 100644 --- a/Content.IntegrationTests/Tests/Destructible/DestructibleThresholdActivationTest.cs +++ b/Content.IntegrationTests/Tests/Destructible/DestructibleThresholdActivationTest.cs @@ -191,7 +191,7 @@ namespace Content.IntegrationTests.Tests.Destructible // Verify the first one, should be the lowest one (20) msg = sThresholdListenerComponent.ThresholdsReached[0]; - var trigger = (TotalDamageTrigger) msg.Threshold.Trigger; + var trigger = (DamageTrigger) msg.Threshold.Trigger; Assert.NotNull(trigger); Assert.That(trigger.Damage, Is.EqualTo(20)); @@ -202,7 +202,7 @@ namespace Content.IntegrationTests.Tests.Destructible // Verify the second one, should be the highest one (50) msg = sThresholdListenerComponent.ThresholdsReached[1]; - trigger = (TotalDamageTrigger) msg.Threshold.Trigger; + trigger = (DamageTrigger) msg.Threshold.Trigger; Assert.NotNull(trigger); Assert.That(trigger.Damage, Is.EqualTo(50)); diff --git a/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/AndTrigger.cs b/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/AndTrigger.cs new file mode 100644 index 0000000000..a97145ace1 --- /dev/null +++ b/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/AndTrigger.cs @@ -0,0 +1,37 @@ +#nullable enable +using System; +using System.Collections.Generic; +using Content.Server.GameObjects.EntitySystems; +using Content.Shared.GameObjects.Components.Damage; +using Robust.Shared.Interfaces.Serialization; +using Robust.Shared.Serialization; + +namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Triggers +{ + /// + /// A trigger that will activate when all of its triggers have activated. + /// + [Serializable] + public class AndTrigger : IThresholdTrigger + { + public List Triggers { get; set; } = new(); + + void IExposeData.ExposeData(ObjectSerializer serializer) + { + serializer.DataField(this, x => x.Triggers, "triggers", new List()); + } + + public bool Reached(IDamageableComponent damageable, DestructibleSystem system) + { + foreach (var trigger in Triggers) + { + if (!trigger.Reached(damageable, system)) + { + return false; + } + } + + return true; + } + } +} diff --git a/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/TotalDamageTypesTrigger.cs b/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/DamageClassTrigger.cs similarity index 51% rename from Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/TotalDamageTypesTrigger.cs rename to Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/DamageClassTrigger.cs index 89316767f3..9d46a15302 100644 --- a/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/TotalDamageTypesTrigger.cs +++ b/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/DamageClassTrigger.cs @@ -1,6 +1,5 @@ #nullable enable using System; -using System.Collections.Generic; using Content.Server.GameObjects.EntitySystems; using Content.Shared.Damage; using Content.Shared.GameObjects.Components.Damage; @@ -10,39 +9,37 @@ using Robust.Shared.Serialization; namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Triggers { /// - /// A trigger that will activate when all of the damage types received - /// are above the specified threshold. + /// A trigger that will activate when the amount of damage received + /// of the specified class is above the specified threshold. /// [Serializable] - public class TotalDamageTypesTrigger : IThresholdTrigger + public class DamageClassTrigger : IThresholdTrigger { /// - /// The amount of damage at which this threshold will trigger. - /// The damage requirements of all must be met. + /// The class to check the damage of. /// - private Dictionary Damage { get; set; } = new(); + public DamageClass? Class { get; set; } + + /// + /// The amount of damage at which this threshold will trigger. + /// + public int Damage { get; set; } void IExposeData.ExposeData(ObjectSerializer serializer) { - serializer.DataField(this, x => x.Damage, "damage", new Dictionary()); + serializer.DataField(this, x => x.Class, "class", null); + serializer.DataField(this, x => x.Damage, "damage", 0); } public bool Reached(IDamageableComponent damageable, DestructibleSystem system) { - foreach (var (type, damageRequired) in Damage) + if (Class == null) { - if (!damageable.TryGetDamage(type, out var damageReceived)) - { - return false; - } - - if (damageReceived < damageRequired) - { - return false; - } + return false; } - return true; + return damageable.TryGetDamage(Class.Value, out var damageReceived) && + damageReceived >= Damage; } } } diff --git a/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/TotalDamageTrigger.cs b/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/DamageTrigger.cs similarity index 74% rename from Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/TotalDamageTrigger.cs rename to Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/DamageTrigger.cs index 3d48b4b90b..81653ac303 100644 --- a/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/TotalDamageTrigger.cs +++ b/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/DamageTrigger.cs @@ -8,16 +8,16 @@ using Robust.Shared.Serialization; namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Triggers { /// - /// A trigger that will activate when the amount of total damage received + /// A trigger that will activate when the amount of damage received /// is above the specified threshold. /// [Serializable] - public class TotalDamageTrigger : IThresholdTrigger + public class DamageTrigger : IThresholdTrigger { /// - /// The amount of total damage at which this threshold will trigger. + /// The amount of damage at which this threshold will trigger. /// - public int Damage { get; private set; } + public int Damage { get; set; } void IExposeData.ExposeData(ObjectSerializer serializer) { diff --git a/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/DamageTypeTrigger.cs b/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/DamageTypeTrigger.cs new file mode 100644 index 0000000000..7546d0f4f4 --- /dev/null +++ b/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/DamageTypeTrigger.cs @@ -0,0 +1,39 @@ +#nullable enable +using System; +using Content.Server.GameObjects.EntitySystems; +using Content.Shared.Damage; +using Content.Shared.GameObjects.Components.Damage; +using Robust.Shared.Interfaces.Serialization; +using Robust.Shared.Serialization; + +namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Triggers +{ + /// + /// A trigger that will activate when the amount of damage received + /// of the specified type is above the specified threshold. + /// + [Serializable] + public class DamageTypeTrigger : IThresholdTrigger + { + public DamageType? Type { get; set; } + + public int Damage { get; set; } + + void IExposeData.ExposeData(ObjectSerializer serializer) + { + serializer.DataField(this, x => x.Type, "type", null); + serializer.DataField(this, x => x.Damage, "damage", 0); + } + + public bool Reached(IDamageableComponent damageable, DestructibleSystem system) + { + if (Type == null) + { + return false; + } + + return damageable.TryGetDamage(Type.Value, out var damageReceived) && + damageReceived >= Damage; + } + } +} diff --git a/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/OrTrigger.cs b/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/OrTrigger.cs new file mode 100644 index 0000000000..eaf234c9bc --- /dev/null +++ b/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/OrTrigger.cs @@ -0,0 +1,37 @@ +#nullable enable +using System; +using System.Collections.Generic; +using Content.Server.GameObjects.EntitySystems; +using Content.Shared.GameObjects.Components.Damage; +using Robust.Shared.Interfaces.Serialization; +using Robust.Shared.Serialization; + +namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Triggers +{ + /// + /// A trigger that will activate when any of its triggers have activated. + /// + [Serializable] + public class OrTrigger : IThresholdTrigger + { + public List Triggers { get; } = new(); + + void IExposeData.ExposeData(ObjectSerializer serializer) + { + serializer.DataField(this, x => x.Triggers, "triggers", new List()); + } + + public bool Reached(IDamageableComponent damageable, DestructibleSystem system) + { + foreach (var trigger in Triggers) + { + if (trigger.Reached(damageable, system)) + { + return true; + } + } + + return false; + } + } +} diff --git a/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/TotalDamageClassesTrigger.cs b/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/TotalDamageClassesTrigger.cs deleted file mode 100644 index 79dd799895..0000000000 --- a/Content.Server/GameObjects/Components/Destructible/Thresholds/Triggers/TotalDamageClassesTrigger.cs +++ /dev/null @@ -1,48 +0,0 @@ -#nullable enable -using System; -using System.Collections.Generic; -using Content.Server.GameObjects.EntitySystems; -using Content.Shared.Damage; -using Content.Shared.GameObjects.Components.Damage; -using Robust.Shared.Interfaces.Serialization; -using Robust.Shared.Serialization; - -namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Triggers -{ - /// - /// A trigger that will activate when all of the damage classes received - /// are above the specified threshold. - /// - [Serializable] - public class TotalDamageClassesTrigger : IThresholdTrigger - { - /// - /// The amount of damage at which this threshold will trigger. - /// The damage requirements of all must be met. - /// - private Dictionary Damage { get; set; } = new(); - - void IExposeData.ExposeData(ObjectSerializer serializer) - { - serializer.DataField(this, x => x.Damage, "damage", new Dictionary()); - } - - public bool Reached(IDamageableComponent damageable, DestructibleSystem system) - { - foreach (var (type, damageRequired) in Damage) - { - if (!damageable.TryGetDamage(type, out var damageReceived)) - { - return false; - } - - if (damageReceived < damageRequired) - { - return false; - } - } - - return true; - } - } -} diff --git a/Content.Server/GameObjects/Components/WindowComponent.cs b/Content.Server/GameObjects/Components/WindowComponent.cs index da399aae44..46b8dc26e9 100644 --- a/Content.Server/GameObjects/Components/WindowComponent.cs +++ b/Content.Server/GameObjects/Components/WindowComponent.cs @@ -46,7 +46,7 @@ namespace Content.Server.GameObjects.Components { foreach (var threshold in destructible.Thresholds) { - if (threshold.Trigger is not TotalDamageTrigger trigger) + if (threshold.Trigger is not DamageTrigger trigger) { continue; } @@ -65,12 +65,12 @@ namespace Content.Server.GameObjects.Components } var damage = damageable.TotalDamage; - TotalDamageTrigger? trigger = null; + DamageTrigger? trigger = null; // TODO: Pretend this does not exist until https://github.com/space-wizards/space-station-14/pull/2783 is merged foreach (var threshold in destructible.Thresholds) { - if ((trigger = threshold.Trigger as TotalDamageTrigger) != null) + if ((trigger = threshold.Trigger as DamageTrigger) != null) { break; } diff --git a/Resources/Prototypes/Entities/Constructible/Doors/airlock_base.yml b/Resources/Prototypes/Entities/Constructible/Doors/airlock_base.yml index e35a2639b5..62c4cdbfd6 100644 --- a/Resources/Prototypes/Entities/Constructible/Doors/airlock_base.yml +++ b/Resources/Prototypes/Entities/Constructible/Doors/airlock_base.yml @@ -61,7 +61,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 500 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Furniture/beds.yml b/Resources/Prototypes/Entities/Constructible/Furniture/beds.yml index 1c778b4ff5..7e0420ad04 100644 --- a/Resources/Prototypes/Entities/Constructible/Furniture/beds.yml +++ b/Resources/Prototypes/Entities/Constructible/Furniture/beds.yml @@ -26,7 +26,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 75 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Furniture/bookshelf.yml b/Resources/Prototypes/Entities/Constructible/Furniture/bookshelf.yml index 670f0d1972..774d9252dd 100644 --- a/Resources/Prototypes/Entities/Constructible/Furniture/bookshelf.yml +++ b/Resources/Prototypes/Entities/Constructible/Furniture/bookshelf.yml @@ -24,7 +24,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 30 behaviors: - !type:PlaySoundBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Furniture/instruments.yml b/Resources/Prototypes/Entities/Constructible/Furniture/instruments.yml index 0efff560fe..bfa5aff82b 100644 --- a/Resources/Prototypes/Entities/Constructible/Furniture/instruments.yml +++ b/Resources/Prototypes/Entities/Constructible/Furniture/instruments.yml @@ -25,7 +25,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 50 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Furniture/pilot_chair.yml b/Resources/Prototypes/Entities/Constructible/Furniture/pilot_chair.yml index d952e787cf..e60e0cf9f1 100644 --- a/Resources/Prototypes/Entities/Constructible/Furniture/pilot_chair.yml +++ b/Resources/Prototypes/Entities/Constructible/Furniture/pilot_chair.yml @@ -16,7 +16,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Furniture/seats.yml b/Resources/Prototypes/Entities/Constructible/Furniture/seats.yml index 893aa5de52..982c54ef61 100644 --- a/Resources/Prototypes/Entities/Constructible/Furniture/seats.yml +++ b/Resources/Prototypes/Entities/Constructible/Furniture/seats.yml @@ -35,7 +35,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 50 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Furniture/storage.yml b/Resources/Prototypes/Entities/Constructible/Furniture/storage.yml index 9ef4248c6b..f54fa0e1a1 100644 --- a/Resources/Prototypes/Entities/Constructible/Furniture/storage.yml +++ b/Resources/Prototypes/Entities/Constructible/Furniture/storage.yml @@ -32,7 +32,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 30 behaviors: - !type:PlaySoundBehavior @@ -79,7 +79,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 30 behaviors: - !type:PlaySoundBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Furniture/tables.yml b/Resources/Prototypes/Entities/Constructible/Furniture/tables.yml index 661981e61d..62750b1bcc 100644 --- a/Resources/Prototypes/Entities/Constructible/Furniture/tables.yml +++ b/Resources/Prototypes/Entities/Constructible/Furniture/tables.yml @@ -40,7 +40,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 15 behaviors: - !type:PlaySoundBehavior @@ -68,7 +68,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 1 behaviors: - !type:PlaySoundBehavior @@ -99,7 +99,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 1 behaviors: - !type:PlaySoundBehavior @@ -127,7 +127,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 15 behaviors: - !type:PlaySoundBehavior @@ -158,7 +158,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 75 behaviors: - !type:PlaySoundBehavior @@ -189,7 +189,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 5 behaviors: - !type:PlaySoundBehavior @@ -220,7 +220,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 20 behaviors: - !type:PlaySoundBehavior @@ -251,7 +251,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 15 behaviors: - !type:PlaySoundBehavior @@ -282,7 +282,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 15 behaviors: - !type:PlaySoundBehavior @@ -313,7 +313,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 50 behaviors: - !type:PlaySoundBehavior @@ -336,7 +336,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 1 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Ground/gascanisterports.yml b/Resources/Prototypes/Entities/Constructible/Ground/gascanisterports.yml index a5f42544a1..89a4c0bac4 100644 --- a/Resources/Prototypes/Entities/Constructible/Ground/gascanisterports.yml +++ b/Resources/Prototypes/Entities/Constructible/Ground/gascanisterports.yml @@ -20,7 +20,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Ground/gascanisters.yml b/Resources/Prototypes/Entities/Constructible/Ground/gascanisters.yml index c013fe4a85..d4e8add604 100644 --- a/Resources/Prototypes/Entities/Constructible/Ground/gascanisters.yml +++ b/Resources/Prototypes/Entities/Constructible/Ground/gascanisters.yml @@ -14,7 +14,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Ground/gasfilters.yml b/Resources/Prototypes/Entities/Constructible/Ground/gasfilters.yml index 511c366131..9c351f2c6d 100644 --- a/Resources/Prototypes/Entities/Constructible/Ground/gasfilters.yml +++ b/Resources/Prototypes/Entities/Constructible/Ground/gasfilters.yml @@ -14,7 +14,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Ground/kitchen.yml b/Resources/Prototypes/Entities/Constructible/Ground/kitchen.yml index b96351cbe8..e9d7cbd46a 100644 --- a/Resources/Prototypes/Entities/Constructible/Ground/kitchen.yml +++ b/Resources/Prototypes/Entities/Constructible/Ground/kitchen.yml @@ -24,7 +24,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 50 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Ground/pipes.yml b/Resources/Prototypes/Entities/Constructible/Ground/pipes.yml index c28a4aac76..b57e230ce1 100644 --- a/Resources/Prototypes/Entities/Constructible/Ground/pipes.yml +++ b/Resources/Prototypes/Entities/Constructible/Ground/pipes.yml @@ -15,7 +15,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Ground/pumps.yml b/Resources/Prototypes/Entities/Constructible/Ground/pumps.yml index 7c49244cbf..e44732f0a4 100644 --- a/Resources/Prototypes/Entities/Constructible/Ground/pumps.yml +++ b/Resources/Prototypes/Entities/Constructible/Ground/pumps.yml @@ -14,7 +14,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Ground/scrubbers.yml b/Resources/Prototypes/Entities/Constructible/Ground/scrubbers.yml index 56a588242c..74e1e046f0 100644 --- a/Resources/Prototypes/Entities/Constructible/Ground/scrubbers.yml +++ b/Resources/Prototypes/Entities/Constructible/Ground/scrubbers.yml @@ -14,7 +14,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Ground/vents.yml b/Resources/Prototypes/Entities/Constructible/Ground/vents.yml index a07116725e..9fd0f44784 100644 --- a/Resources/Prototypes/Entities/Constructible/Ground/vents.yml +++ b/Resources/Prototypes/Entities/Constructible/Ground/vents.yml @@ -14,7 +14,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Power/computers.yml b/Resources/Prototypes/Entities/Constructible/Power/computers.yml index 540b1c3fca..b635a5de10 100644 --- a/Resources/Prototypes/Entities/Constructible/Power/computers.yml +++ b/Resources/Prototypes/Entities/Constructible/Power/computers.yml @@ -99,7 +99,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Power/debug_power.yml b/Resources/Prototypes/Entities/Constructible/Power/debug_power.yml index ac2097e731..11e60743c0 100644 --- a/Resources/Prototypes/Entities/Constructible/Power/debug_power.yml +++ b/Resources/Prototypes/Entities/Constructible/Power/debug_power.yml @@ -32,7 +32,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Power/power_base.yml b/Resources/Prototypes/Entities/Constructible/Power/power_base.yml index 7dd653d735..083cac2119 100644 --- a/Resources/Prototypes/Entities/Constructible/Power/power_base.yml +++ b/Resources/Prototypes/Entities/Constructible/Power/power_base.yml @@ -258,7 +258,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Power/vending_machines.yml b/Resources/Prototypes/Entities/Constructible/Power/vending_machines.yml index f19620729b..64a8027a22 100644 --- a/Resources/Prototypes/Entities/Constructible/Power/vending_machines.yml +++ b/Resources/Prototypes/Entities/Constructible/Power/vending_machines.yml @@ -33,7 +33,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 50 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Power/wires.yml b/Resources/Prototypes/Entities/Constructible/Power/wires.yml index 4f64639e05..0fd5c99e80 100644 --- a/Resources/Prototypes/Entities/Constructible/Power/wires.yml +++ b/Resources/Prototypes/Entities/Constructible/Power/wires.yml @@ -23,7 +23,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior @@ -56,7 +56,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:SpawnEntitiesBehavior @@ -95,7 +95,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:SpawnEntitiesBehavior @@ -136,7 +136,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:SpawnEntitiesBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Specific/Engines/AME/ame_controller.yml b/Resources/Prototypes/Entities/Constructible/Specific/Engines/AME/ame_controller.yml index 6cd9655e6f..ab362d1eae 100644 --- a/Resources/Prototypes/Entities/Constructible/Specific/Engines/AME/ame_controller.yml +++ b/Resources/Prototypes/Entities/Constructible/Specific/Engines/AME/ame_controller.yml @@ -26,7 +26,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 500 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Specific/Engines/AME/ame_structure.yml b/Resources/Prototypes/Entities/Constructible/Specific/Engines/AME/ame_structure.yml index 829e1c3c7e..9c6223b53a 100644 --- a/Resources/Prototypes/Entities/Constructible/Specific/Engines/AME/ame_structure.yml +++ b/Resources/Prototypes/Entities/Constructible/Specific/Engines/AME/ame_structure.yml @@ -26,7 +26,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 500 behaviors: - !type:SpawnEntitiesBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Specific/Medical/cloning_machine.yml b/Resources/Prototypes/Entities/Constructible/Specific/Medical/cloning_machine.yml index c9c770647a..3f07f2d0dc 100644 --- a/Resources/Prototypes/Entities/Constructible/Specific/Medical/cloning_machine.yml +++ b/Resources/Prototypes/Entities/Constructible/Specific/Medical/cloning_machine.yml @@ -35,7 +35,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Specific/Medical/medical_scanner.yml b/Resources/Prototypes/Entities/Constructible/Specific/Medical/medical_scanner.yml index 23048139d1..9390342574 100644 --- a/Resources/Prototypes/Entities/Constructible/Specific/Medical/medical_scanner.yml +++ b/Resources/Prototypes/Entities/Constructible/Specific/Medical/medical_scanner.yml @@ -35,7 +35,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Specific/cargo_telepad.yml b/Resources/Prototypes/Entities/Constructible/Specific/cargo_telepad.yml index f2553f0bd4..111511aa4f 100644 --- a/Resources/Prototypes/Entities/Constructible/Specific/cargo_telepad.yml +++ b/Resources/Prototypes/Entities/Constructible/Specific/cargo_telepad.yml @@ -22,7 +22,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 75 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Specific/chem_master.yml b/Resources/Prototypes/Entities/Constructible/Specific/chem_master.yml index a29d04f713..8a93d5009a 100644 --- a/Resources/Prototypes/Entities/Constructible/Specific/chem_master.yml +++ b/Resources/Prototypes/Entities/Constructible/Specific/chem_master.yml @@ -36,7 +36,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 50 behaviors: - !type:SpawnEntitiesBehavior @@ -87,7 +87,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 25 behaviors: - !type:SpawnEntitiesBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Specific/disposal.yml b/Resources/Prototypes/Entities/Constructible/Specific/disposal.yml index 68ddd0dcf1..4248ef7196 100644 --- a/Resources/Prototypes/Entities/Constructible/Specific/disposal.yml +++ b/Resources/Prototypes/Entities/Constructible/Specific/disposal.yml @@ -18,7 +18,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior @@ -154,7 +154,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior @@ -397,7 +397,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Specific/gravity_generator.yml b/Resources/Prototypes/Entities/Constructible/Specific/gravity_generator.yml index f902754032..44f726e72e 100644 --- a/Resources/Prototypes/Entities/Constructible/Specific/gravity_generator.yml +++ b/Resources/Prototypes/Entities/Constructible/Specific/gravity_generator.yml @@ -34,7 +34,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 150 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Specific/hydroponics.yml b/Resources/Prototypes/Entities/Constructible/Specific/hydroponics.yml index 5afac6dd20..2d139cce5e 100644 --- a/Resources/Prototypes/Entities/Constructible/Specific/hydroponics.yml +++ b/Resources/Prototypes/Entities/Constructible/Specific/hydroponics.yml @@ -28,7 +28,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 50 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Storage/Closets/closet.yml b/Resources/Prototypes/Entities/Constructible/Storage/Closets/closet.yml index 5c721679e6..9cd07d8e32 100644 --- a/Resources/Prototypes/Entities/Constructible/Storage/Closets/closet.yml +++ b/Resources/Prototypes/Entities/Constructible/Storage/Closets/closet.yml @@ -44,7 +44,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Storage/Crates/crate_base.yml b/Resources/Prototypes/Entities/Constructible/Storage/Crates/crate_base.yml index 851baac2b8..61c50e31d0 100644 --- a/Resources/Prototypes/Entities/Constructible/Storage/Crates/crate_base.yml +++ b/Resources/Prototypes/Entities/Constructible/Storage/Crates/crate_base.yml @@ -40,7 +40,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Storage/StorageTanks/base_tank.yml b/Resources/Prototypes/Entities/Constructible/Storage/StorageTanks/base_tank.yml index efce938513..f66eba078d 100644 --- a/Resources/Prototypes/Entities/Constructible/Storage/StorageTanks/base_tank.yml +++ b/Resources/Prototypes/Entities/Constructible/Storage/StorageTanks/base_tank.yml @@ -28,7 +28,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 10 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Walls/asteroid.yml b/Resources/Prototypes/Entities/Constructible/Walls/asteroid.yml index 9f87b72f8a..d4b61d585e 100644 --- a/Resources/Prototypes/Entities/Constructible/Walls/asteroid.yml +++ b/Resources/Prototypes/Entities/Constructible/Walls/asteroid.yml @@ -19,7 +19,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Walls/girder.yml b/Resources/Prototypes/Entities/Constructible/Walls/girder.yml index c1b1756643..34b7d7b56b 100644 --- a/Resources/Prototypes/Entities/Constructible/Walls/girder.yml +++ b/Resources/Prototypes/Entities/Constructible/Walls/girder.yml @@ -33,7 +33,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 50 behaviors: - !type:SpawnEntitiesBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Walls/lighting.yml b/Resources/Prototypes/Entities/Constructible/Walls/lighting.yml index 9d750a029d..2d782dc299 100644 --- a/Resources/Prototypes/Entities/Constructible/Walls/lighting.yml +++ b/Resources/Prototypes/Entities/Constructible/Walls/lighting.yml @@ -44,7 +44,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 50 behaviors: - !type:DoActsBehavior @@ -73,8 +73,13 @@ enabled: true offset: "0.5, 0" - type: Destructible - deadThreshold: 25 - resistances: metallicResistances + thresholds: + - trigger: + !type:DamageTrigger + damage: 25 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] - type: Construction graph: lightFixture node: bulbLight @@ -104,7 +109,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 25 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Walls/low_wall.yml b/Resources/Prototypes/Entities/Constructible/Walls/low_wall.yml index 855d13a9d0..84d2c814e2 100644 --- a/Resources/Prototypes/Entities/Constructible/Walls/low_wall.yml +++ b/Resources/Prototypes/Entities/Constructible/Walls/low_wall.yml @@ -30,7 +30,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Walls/signs.yml b/Resources/Prototypes/Entities/Constructible/Walls/signs.yml index 5fa72911c7..311f160d43 100644 --- a/Resources/Prototypes/Entities/Constructible/Walls/signs.yml +++ b/Resources/Prototypes/Entities/Constructible/Walls/signs.yml @@ -13,7 +13,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 5 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Walls/walls.yml b/Resources/Prototypes/Entities/Constructible/Walls/walls.yml index 80bdf95b40..635831bc3e 100644 --- a/Resources/Prototypes/Entities/Constructible/Walls/walls.yml +++ b/Resources/Prototypes/Entities/Constructible/Walls/walls.yml @@ -52,7 +52,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 300 behaviors: - !type:SpawnEntitiesBehavior @@ -80,7 +80,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 300 behaviors: - !type:SpawnEntitiesBehavior @@ -108,7 +108,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 300 behaviors: - !type:SpawnEntitiesBehavior @@ -137,7 +137,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 300 behaviors: - !type:SpawnEntitiesBehavior @@ -165,7 +165,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 300 behaviors: - !type:SpawnEntitiesBehavior @@ -193,7 +193,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 300 behaviors: - !type:SpawnEntitiesBehavior @@ -222,7 +222,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 300 behaviors: - !type:SpawnEntitiesBehavior @@ -250,7 +250,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 300 behaviors: - !type:SpawnEntitiesBehavior @@ -278,7 +278,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 300 behaviors: - !type:SpawnEntitiesBehavior @@ -306,7 +306,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 300 behaviors: - !type:SpawnEntitiesBehavior @@ -334,7 +334,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 300 behaviors: - !type:SpawnEntitiesBehavior @@ -367,7 +367,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 600 behaviors: - !type:DoActsBehavior @@ -397,7 +397,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 1000 behaviors: - !type:SpawnEntitiesBehavior @@ -425,7 +425,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 300 behaviors: - !type:SpawnEntitiesBehavior @@ -453,7 +453,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 300 behaviors: - !type:SpawnEntitiesBehavior @@ -485,7 +485,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 300 behaviors: - !type:DoActsBehavior @@ -511,7 +511,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 300 behaviors: - !type:SpawnEntitiesBehavior @@ -539,7 +539,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 300 behaviors: - !type:SpawnEntitiesBehavior diff --git a/Resources/Prototypes/Entities/Constructible/Walls/windows.yml b/Resources/Prototypes/Entities/Constructible/Walls/windows.yml index 3561517408..571e5e7ea2 100644 --- a/Resources/Prototypes/Entities/Constructible/Walls/windows.yml +++ b/Resources/Prototypes/Entities/Constructible/Walls/windows.yml @@ -31,7 +31,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 15 behaviors: - !type:PlaySoundCollectionBehavior @@ -70,7 +70,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 75 behaviors: - !type:PlaySoundCollectionBehavior @@ -103,7 +103,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 100 behaviors: - !type:PlaySoundCollectionBehavior diff --git a/Resources/Prototypes/Entities/Effects/chemistry_effects.yml b/Resources/Prototypes/Entities/Effects/chemistry_effects.yml index 90d3f438df..60c1bc1e8a 100644 --- a/Resources/Prototypes/Entities/Effects/chemistry_effects.yml +++ b/Resources/Prototypes/Entities/Effects/chemistry_effects.yml @@ -126,7 +126,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 50 behaviors: - !type:DoActsBehavior diff --git a/Resources/Prototypes/Entities/Mobs/Species/human.yml b/Resources/Prototypes/Entities/Mobs/Species/human.yml index c4ec747fc5..b899c5ca08 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/human.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/human.yml @@ -165,9 +165,9 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTypesTrigger - damage: - Blunt: 400 + !type:DamageTypeTrigger + type: Blunt + damage: 400 behaviors: - !type:GibBehavior { } - type: HeatResistance diff --git a/Resources/Prototypes/Entities/Objects/Consumable/drinks.yml b/Resources/Prototypes/Entities/Objects/Consumable/drinks.yml index 31c5f77a48..fa18aa2bfc 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/drinks.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/drinks.yml @@ -27,7 +27,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 5 behaviors: - !type:PlaySoundCollectionBehavior diff --git a/Resources/Prototypes/Entities/Objects/Consumable/drinks_bottles.yml b/Resources/Prototypes/Entities/Objects/Consumable/drinks_bottles.yml index b294dfab05..595bbef887 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/drinks_bottles.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/drinks_bottles.yml @@ -20,7 +20,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 5 behaviors: - !type:PlaySoundCollectionBehavior diff --git a/Resources/Prototypes/Entities/Objects/Misc/fluff_lights.yml b/Resources/Prototypes/Entities/Objects/Misc/fluff_lights.yml index 5da29c32bb..fef0eab298 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/fluff_lights.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/fluff_lights.yml @@ -132,7 +132,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 10 behaviors: - !type:PlaySoundBehavior @@ -163,7 +163,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 20 behaviors: - !type:PlaySoundBehavior diff --git a/Resources/Prototypes/Entities/Objects/Power/lights.yml b/Resources/Prototypes/Entities/Objects/Power/lights.yml index 386970c607..9f9d9933a7 100644 --- a/Resources/Prototypes/Entities/Objects/Power/lights.yml +++ b/Resources/Prototypes/Entities/Objects/Power/lights.yml @@ -12,7 +12,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 5 behaviors: - !type:PlaySoundCollectionBehavior @@ -20,7 +20,7 @@ - !type:DoActsBehavior acts: [ "Breakage" ] - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 10 behaviors: - !type:PlaySoundCollectionBehavior diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Explosives/grenades.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Explosives/grenades.yml index ac0c09d3ee..4cc39f1f3f 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Explosives/grenades.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Explosives/grenades.yml @@ -26,7 +26,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 10 behaviors: - !type:DoActsBehavior @@ -60,7 +60,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 10 behaviors: - !type:DoActsBehavior @@ -94,7 +94,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 10 behaviors: - !type:DoActsBehavior @@ -127,7 +127,7 @@ - type: Destructible thresholds: - trigger: - !type:TotalDamageTrigger + !type:DamageTrigger damage: 50 behaviors: - !type:DoActsBehavior