]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix(CuffableSystem): Check if cuffs can be transferred(dropped) (#30465)
authorBrandon Hu <103440971+Brandon-Huu@users.noreply.github.com>
Fri, 9 Aug 2024 06:26:04 +0000 (06:26 +0000)
committerGitHub <noreply@github.com>
Fri, 9 Aug 2024 06:26:04 +0000 (16:26 +1000)
* 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
Resources/Locale/en-US/cuffs/components/handcuff-component.ftl

index b540cc3a376e651efd92bf6f1b1048f58e4d7130..21d09c744cd6ad74348d850181f428d0065c4d87 100644 (file)
@@ -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<StunnedComponent>(target))
index 16447f425158cb805039cb279e0097d8d9ba8123..a4de62ede48a3f86f92e553115b8b618d147ae09 100644 (file)
@@ -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}