Skip to content

Commit

Permalink
Make minibomb explosion resistant and trigger timer on damage
Browse files Browse the repository at this point in the history
  • Loading branch information
SaphireLattice committed Sep 24, 2024
1 parent b32bdbf commit 7fde051
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,21 @@
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: 20
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- type: OnUseTimerTrigger
delay: 5
- type: ExplodeOnTrigger
Expand Down

0 comments on commit 7fde051

Please sign in to comment.