Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon-Huu committed Jul 30, 2024
1 parent 3ac15df commit edca368
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Content.Shared/Cuffs/SharedCuffableSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ public bool TryCuffing(EntityUid user, EntityUid target, EntityUid handcuff, Han
{
if (!Resolve(handcuff, ref handcuffComponent) || !Resolve(target, ref cuffable, false))
return false;

if (!TryComp<HandsComponent>(target, out var hands))
{
_popup.PopupClient(Loc.GetString("handcuff-component-target-has-no-hands-error",
Expand All @@ -489,6 +488,10 @@ public bool TryCuffing(EntityUid user, EntityUid target, EntityUid handcuff, Han
return true;
}

if (!_hands.CanDrop(user, handcuff))
// TODO: Add a popup explaining why cuffing failed
return false;

var cuffTime = handcuffComponent.CuffTime;

if (HasComp<StunnedComponent>(target))
Expand Down

0 comments on commit edca368

Please sign in to comment.