From 7e44673bc3887fa419fec7948e7e3e1d15404e32 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Mon, 7 Nov 2022 03:31:23 +1100 Subject: [PATCH] Subscribe to attackattempt for stuncomp (#12415) --- Content.Shared/Stunnable/SharedStunSystem.cs | 33 +++++--------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/Content.Shared/Stunnable/SharedStunSystem.cs b/Content.Shared/Stunnable/SharedStunSystem.cs index 75db954007..590d36b035 100644 --- a/Content.Shared/Stunnable/SharedStunSystem.cs +++ b/Content.Shared/Stunnable/SharedStunSystem.cs @@ -59,11 +59,12 @@ namespace Content.Shared.Stunnable // Attempt event subscriptions. SubscribeLocalEvent(OnMoveAttempt); - SubscribeLocalEvent(OnInteractAttempt); - SubscribeLocalEvent(OnUseAttempt); - SubscribeLocalEvent(OnThrowAttempt); - SubscribeLocalEvent(OnDropAttempt); - SubscribeLocalEvent(OnPickupAttempt); + SubscribeLocalEvent(OnAttempt); + SubscribeLocalEvent(OnAttempt); + SubscribeLocalEvent(OnAttempt); + SubscribeLocalEvent(OnAttempt); + SubscribeLocalEvent(OnAttempt); + SubscribeLocalEvent(OnAttempt); SubscribeLocalEvent(OnEquipAttempt); SubscribeLocalEvent(OnUnequipAttempt); } @@ -243,27 +244,7 @@ namespace Content.Shared.Stunnable args.Cancel(); } - private void OnInteractAttempt(EntityUid uid, StunnedComponent stunned, InteractionAttemptEvent args) - { - args.Cancel(); - } - - private void OnUseAttempt(EntityUid uid, StunnedComponent stunned, UseAttemptEvent args) - { - args.Cancel(); - } - - private void OnThrowAttempt(EntityUid uid, StunnedComponent stunned, ThrowAttemptEvent args) - { - args.Cancel(); - } - - private void OnDropAttempt(EntityUid uid, StunnedComponent stunned, DropAttemptEvent args) - { - args.Cancel(); - } - - private void OnPickupAttempt(EntityUid uid, StunnedComponent stunned, PickupAttemptEvent args) + private void OnAttempt(EntityUid uid, StunnedComponent stunned, CancellableEntityEventArgs args) { args.Cancel(); }