CatStation/Content.Shared/Trigger/Systems/StunOnTriggerSystem.cs
Pieter-Jan Briers 5168b5f3d4
IoC source gen compatibility (#43863)
* IoC source gen compatibility

Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter.

* Missed a spot
2026-05-09 03:29:58 +00:00

17 lines
620 B
C#

using Content.Shared.Stunnable;
using Content.Shared.Trigger.Components.Effects;
namespace Content.Shared.Trigger.Systems;
public sealed partial class StunOnTriggerSystem : XOnTriggerSystem<StunOnTriggerComponent>
{
[Dependency] private SharedStunSystem _stun = default!;
protected override void OnTrigger(Entity<StunOnTriggerComponent> ent, EntityUid target, ref TriggerEvent args)
{
if (ent.Comp.Refresh)
args.Handled |= _stun.TryUpdateStunDuration(target, ent.Comp.StunAmount);
else
args.Handled |= _stun.TryAddStunDuration(target, ent.Comp.StunAmount);
}
}