From 021c9832ef87832fbb9b66d760b9fb42a113339b Mon Sep 17 00:00:00 2001 From: Plykiya <58439124+Plykiya@users.noreply.github.com> Date: Sat, 30 Nov 2024 07:58:56 -0800 Subject: [PATCH] Fix for handcuffing someone more than once (#33646) * Fix for over-cuffing someone * comment --- Content.Shared/Cuffs/SharedCuffableSystem.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Content.Shared/Cuffs/SharedCuffableSystem.cs b/Content.Shared/Cuffs/SharedCuffableSystem.cs index 21d09c744c..b323dc6dd1 100644 --- a/Content.Shared/Cuffs/SharedCuffableSystem.cs +++ b/Content.Shared/Cuffs/SharedCuffableSystem.cs @@ -461,6 +461,12 @@ namespace Content.Shared.Cuffs if (!_interaction.InRangeUnobstructed(handcuff, target)) return false; + // if the amount of hands the target has is equal to or less than the amount of hands that are cuffed + // don't apply the new set of cuffs + // (how would you even end up with more cuffed hands than actual hands? either way accounting for it) + if (TryComp(target, out var hands) && hands.Count <= component.CuffedHandCount) + return false; + // Success! _hands.TryDrop(user, handcuff);