diff --git a/Content.Server/Destructible/Thresholds/Behaviors/TimerStartBehavior.cs b/Content.Server/Destructible/Thresholds/Behaviors/TimerStartBehavior.cs new file mode 100644 index 00000000000000..97a5f8b7ef5e86 --- /dev/null +++ b/Content.Server/Destructible/Thresholds/Behaviors/TimerStartBehavior.cs @@ -0,0 +1,10 @@ +namespace Content.Server.Destructible.Thresholds.Behaviors; + +[DataDefinition] +public sealed partial class TimerStartBehavior : IThresholdBehavior +{ + public void Execute(EntityUid owner, DestructibleSystem system, EntityUid? cause = null) + { + system.TriggerSystem.StartTimer(owner, cause); + } +} diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml index a279c56378f28b..8f253097abc3cd 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml @@ -106,6 +106,22 @@ components: - type: Sprite sprite: Objects/Weapons/Grenades/syndgrenade.rsi + - type: ExplosionResistance + damageCoefficient: 0.1 + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 10 + behaviors: + - !type:TimerStartBehavior + - trigger: + !type:DamageTrigger + damage: 45 + behaviors: + - !type:TriggerBehavior + - !type:DoActsBehavior + acts: ["Destruction"] - type: OnUseTimerTrigger delay: 5 - type: ExplodeOnTrigger