From 5c1cc5b9b3b60b39b79e93c3c77ede4512d8d0a8 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Thu, 29 Sep 2022 23:38:24 +1000 Subject: [PATCH] Fix melee cuffs (#11602) --- Content.Shared/Cuffs/SharedCuffableSystem.cs | 29 ++++---------------- Resources/Prototypes/Actions/types.yml | 1 + 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/Content.Shared/Cuffs/SharedCuffableSystem.cs b/Content.Shared/Cuffs/SharedCuffableSystem.cs index da28608950..6bf5b2b27f 100644 --- a/Content.Shared/Cuffs/SharedCuffableSystem.cs +++ b/Content.Shared/Cuffs/SharedCuffableSystem.cs @@ -21,12 +21,13 @@ namespace Content.Shared.Cuffs base.Initialize(); SubscribeLocalEvent(HandleStopPull); SubscribeLocalEvent(HandleMoveAttempt); - SubscribeLocalEvent(OnUseAttempt); - SubscribeLocalEvent(OnInteractAttempt); + SubscribeLocalEvent(CheckAct); + SubscribeLocalEvent(CheckAct); + SubscribeLocalEvent(CheckAct); SubscribeLocalEvent(OnEquipAttempt); SubscribeLocalEvent(OnUnequipAttempt); - SubscribeLocalEvent(OnDropAttempt); - SubscribeLocalEvent(OnPickupAttempt); + SubscribeLocalEvent(CheckAct); + SubscribeLocalEvent(CheckAct); SubscribeLocalEvent(OnBeingPulledAttempt); SubscribeLocalEvent(OnPull); SubscribeLocalEvent(OnPull); @@ -73,16 +74,6 @@ namespace Content.Shared.Cuffs args.Cancel(); } - private void OnUseAttempt(EntityUid uid, SharedCuffableComponent component, UseAttemptEvent args) - { - CheckAct(uid, component, args); - } - - private void OnInteractAttempt(EntityUid uid, SharedCuffableComponent component, InteractionAttemptEvent args) - { - CheckAct(uid, component, args); - } - private void OnEquipAttempt(EntityUid uid, SharedCuffableComponent component, IsEquippingAttemptEvent args) { // is this a self-equip, or are they being stripped? @@ -97,16 +88,6 @@ namespace Content.Shared.Cuffs CheckAct(uid, component, args); } - private void OnDropAttempt(EntityUid uid, SharedCuffableComponent component, DropAttemptEvent args) - { - CheckAct(uid, component, args); - } - - private void OnPickupAttempt(EntityUid uid, SharedCuffableComponent component, PickupAttemptEvent args) - { - CheckAct(uid, component, args); - } - #endregion } } diff --git a/Resources/Prototypes/Actions/types.yml b/Resources/Prototypes/Actions/types.yml index 8d2e11dc93..aaddd9965f 100644 --- a/Resources/Prototypes/Actions/types.yml +++ b/Resources/Prototypes/Actions/types.yml @@ -34,6 +34,7 @@ id: CombatModeToggle name: action-name-combat description: action-description-combat + checkCanInteract: false icon: Interface/Actions/harmOff.png iconOn: Interface/Actions/harm.png userPopup: action-popup-combat