From: Plykiya <58439124+Plykiya@users.noreply.github.com> Date: Sat, 30 Nov 2024 15:58:56 +0000 (-0800) Subject: Fix for handcuffing someone more than once (#33646) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=021c9832ef87832fbb9b66d760b9fb42a113339b;p=space-station-14.git Fix for handcuffing someone more than once (#33646) * Fix for over-cuffing someone * comment --- 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);