From c46a4e057a69039e6167a25ef27af683d4368f77 Mon Sep 17 00:00:00 2001 From: Brandon Hu <103440971+Brandon-Huu@users.noreply.github.com> Date: Fri, 9 Aug 2024 06:26:04 +0000 Subject: [PATCH] Fix(CuffableSystem): Check if cuffs can be transferred(dropped) (#30465) * ugh * Revert "ugh" This reverts commit 8b5b0e24bcaa6c5cc9229c17eb138cdb476f0c9e. * Revert "Automatic changelog update" This reverts commit 4f8b634f38e6ba588d45c75b35e5e1446df7949e. * Revert "Revert "Automatic changelog update"" This reverts commit 9fc2a3307a06e5f7d19bbb8d29e45b9a1d1470c8. * Revert "Revert "Revert "Automatic changelog update""" This reverts commit 1ae733bf308d7285159dd1fafd7f17101d8f4ced. * Revert "Revert "Automatic changelog update"" This reverts commit 9fc2a3307a06e5f7d19bbb8d29e45b9a1d1470c8. * Revert "" This reverts commit 1cc0953333cf3d4f2cad5fae2f5c562ae99563ae. * Revert "" This reverts commit edca368a8444fd0fd403333695668d1c1db3726a. * Revert "Revert "ugh"" This reverts commit 3ac15dfb07c7ae43b797724f85b76193ecd7a0e1. * Revert "Revert "Revert "ugh""" This reverts commit b952a4556397c8abcc7c319d736fab7ae48073a2. * Revert "Revert "Revert "Revert "ugh"""" This reverts commit ff1a151571dea653d78ac2bda75eb11209da8d96. * Revert "ugh" This reverts commit 8b5b0e24bcaa6c5cc9229c17eb138cdb476f0c9e. * Update SharedCuffableSystem.cs --- Content.Shared/Cuffs/SharedCuffableSystem.cs | 6 ++++++ .../Locale/en-US/cuffs/components/handcuff-component.ftl | 1 + 2 files changed, 7 insertions(+) diff --git a/Content.Shared/Cuffs/SharedCuffableSystem.cs b/Content.Shared/Cuffs/SharedCuffableSystem.cs index b540cc3a37..21d09c744c 100644 --- a/Content.Shared/Cuffs/SharedCuffableSystem.cs +++ b/Content.Shared/Cuffs/SharedCuffableSystem.cs @@ -489,6 +489,12 @@ namespace Content.Shared.Cuffs return true; } + if (!_hands.CanDrop(user, handcuff)) + { + _popup.PopupClient(Loc.GetString("handcuff-component-cannot-drop-cuffs", ("target", Identity.Name(target, EntityManager, user))), user, user); + return false; + } + var cuffTime = handcuffComponent.CuffTime; if (HasComp(target)) diff --git a/Resources/Locale/en-US/cuffs/components/handcuff-component.ftl b/Resources/Locale/en-US/cuffs/components/handcuff-component.ftl index 16447f4251..a4de62ede4 100644 --- a/Resources/Locale/en-US/cuffs/components/handcuff-component.ftl +++ b/Resources/Locale/en-US/cuffs/components/handcuff-component.ftl @@ -15,3 +15,4 @@ handcuff-component-cuff-interrupt-other-message = You interrupt {$otherName} whi handcuff-component-cuff-interrupt-self-message = You were interrupted while restraining yourself. handcuff-component-cuff-interrupt-buckled-message = You can't buckle while restrained! handcuff-component-cuff-interrupt-unbuckled-message = You can't unbuckle while restrained! +handcuff-component-cannot-drop-cuffs = You are unable to put the restraints on {$target}