Fix for handcuffing someone more than once (#33646)
* Fix for over-cuffing someone * comment
This commit is contained in:
@@ -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<HandsComponent>(target, out var hands) && hands.Count <= component.CuffedHandCount)
|
||||
return false;
|
||||
|
||||
// Success!
|
||||
_hands.TryDrop(user, handcuff);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user