]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Shove down a person on uncuff if harm mode is on (#35193)
authorKillerqu00 <47712032+Killerqu00@users.noreply.github.com>
Sat, 29 Mar 2025 20:09:34 +0000 (21:09 +0100)
committerGitHub <noreply@github.com>
Sat, 29 Mar 2025 20:09:34 +0000 (21:09 +0100)
* stamdamage on uncuff while buckled

* pro tip

* 99 -> 100 stamdmg and don't count self-uncuffs

* review implementation

* tip update

* guidebook update

* merg

Content.Shared/Cuffs/SharedCuffableSystem.cs
Resources/Locale/en-US/cuffs/components/cuffable-component.ftl
Resources/Locale/en-US/tips.ftl
Resources/ServerInfo/Guidebook/Security/Security.xml

index a1f5ec2a1c0743055855840ae4ca9c37069b21d5..bdb3a50454a14b24f5f7c4b4b19efccdb03db240 100644 (file)
@@ -4,6 +4,7 @@ using Content.Shared.Administration.Components;
 using Content.Shared.Administration.Logs;
 using Content.Shared.Alert;
 using Content.Shared.Buckle.Components;
+using Content.Shared.CombatMode;
 using Content.Shared.Cuffs.Components;
 using Content.Shared.Database;
 using Content.Shared.DoAfter;
@@ -53,6 +54,7 @@ namespace Content.Shared.Cuffs
         [Dependency] private readonly SharedPopupSystem _popup = default!;
         [Dependency] private readonly SharedTransformSystem _transform = default!;
         [Dependency] private readonly UseDelaySystem _delay = default!;
+        [Dependency] private readonly SharedCombatModeSystem _combatMode = default!;
 
         public override void Initialize()
         {
@@ -717,10 +719,31 @@ namespace Content.Shared.Cuffs
                 }
             }
 
+            var shoved = false;
+            // if combat mode is on, shove the person.
+            if (_combatMode.IsInCombatMode(user) && target != user && user != null)
+            {
+                var eventArgs = new DisarmedEvent { Target = target, Source = user.Value, PushProbability = 1};
+                RaiseLocalEvent(target, eventArgs);
+                shoved = true;
+            }
+
             if (cuffable.CuffedHandCount == 0)
             {
                 if (user != null)
-                    _popup.PopupClient(Loc.GetString("cuffable-component-remove-cuffs-success-message"), user.Value, user.Value);
+                {
+                    if (shoved)
+                    {
+                        _popup.PopupClient(Loc.GetString("cuffable-component-remove-cuffs-push-success-message",
+                            ("otherName", Identity.Name(user.Value, EntityManager, user))),
+                            user.Value,
+                            user.Value);
+                    }
+                    else
+                    {
+                        _popup.PopupClient(Loc.GetString("cuffable-component-remove-cuffs-success-message"), user.Value, user.Value);
+                    }
+                }
 
                 if (target != user && user != null)
                 {
index a2cb6ed65897b89940c2bc62fcd42652fcf7bb92..092f1d662030a910bb51739583d4c7d87d9c0dda 100644 (file)
@@ -8,6 +8,7 @@ cuffable-component-start-uncuffing-target-message = You start unrestraining {$ta
 cuffable-component-start-uncuffing-by-other-message = {$otherName} starts unrestraining you!
 
 cuffable-component-remove-cuffs-success-message = You successfully remove the restraints.
+cuffable-component-remove-cuffs-push-success-message = You successfully remove the restraints and push {$otherName} down.
 cuffable-component-remove-cuffs-by-other-success-message = {$otherName} unrestrains your hands.
 cuffable-component-remove-cuffs-to-other-partial-success-message = You successfully remove the restraints. {$cuffedHandCount} of {$otherName}'s hands remain restrained.
 cuffable-component-remove-cuffs-by-other-partial-success-message = {$otherName} removes your restraints. {$cuffedHandCount} of your hands remain restrained.
index e0e71d66da1760bd95d420b2f3de50776285426f..ae43ea094a5978d090a5ffcf16c7fda00b577af4 100644 (file)
@@ -135,3 +135,4 @@ tips-dataset-134 = You can tell if an area with firelocks up is spaced by lookin
 tips-dataset-135 = Instead of picking it up, you can alt-click food to eat it. This also works for mice and other creatures without hands.
 tips-dataset-136 = If you're trapped behind an electrified door, disable the APC or throw your ID at the door to avoid getting shocked!
 tips-dataset-137 = If the AI electrifies a door and you have insulated gloves, snip and mend the power wire to reset their electrification!
+tips-dataset-138 = If you want to stop your prisoner from escaping from the cell right after being uncuffed, turn on combat mode while uncuffing - this will shove the prisoner down.
index 7306e3f76138285eeba18c2166d91e9e6de70b71..3df94c6b9b59c313c93708ea3f250de38bac5cfa 100644 (file)
@@ -15,7 +15,7 @@ They face [textlink="Syndicate Agents" link="Traitors"], [textlink="Nuclear Oper
   </Box>
 
 ## Gear
-First we have non-lethals a step above simply telling someone to cooperate with instructions. Both the stunbaton and disabler are capable of limiting the movement of an assailant, whereas handcuffs can be applied to deny a criminal free movement and access to their hands.
+First we have non-lethals a step above simply telling someone to cooperate with instructions. Both the stunbaton and disabler are capable of limiting the movement of an assailant, whereas handcuffs can be applied to deny a criminal free movement and access to their hands. Cuffs will also shove the person down if your [color=red]harm mode[/color] is active during uncuff.
   <Box>
     <GuideEntityEmbed Entity="Stunbaton"/>
     <GuideEntityEmbed Entity="Handcuffs"/>
@@ -31,7 +31,7 @@ It is worth noting that flashes can be both used in a large area ([color=yellow]
     <GuideEntityEmbed Entity="ClothingEyesGlassesSecurity"/>
     <GuideEntityEmbed Entity="GrenadeFlashBang"/>
   </Box>
-  
+
 ## Lethals
 Should the situation dictate, [color=#cb0000]Security[/color] have access to laser rifles, shotguns, handguns and automatic rifles able to put down substancial fire against any who would stand against the station.
   <Box>