]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add a bool to disable buckling on InteractHand (#30001)
authorShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
Sun, 25 Aug 2024 17:09:51 +0000 (10:09 -0700)
committerGitHub <noreply@github.com>
Sun, 25 Aug 2024 17:09:51 +0000 (19:09 +0200)
Content.Shared/Buckle/Components/StrapComponent.cs
Content.Shared/Buckle/SharedBuckleSystem.Interaction.cs
Resources/Prototypes/Entities/Structures/Furniture/rollerbeds.yml

index b8186e2b79f6b7967b6fc04604c5efe3e06018a8..101c388a8bfcf80fc3aa7cbf87d31451b162b719 100644 (file)
@@ -90,6 +90,12 @@ public sealed partial class StrapComponent : Component
     /// </summary>
     [DataField]
     public float BuckleDoafterTime = 2f;
+
+    /// <summary>
+    /// Whether InteractHand will buckle the user to the strap.
+    /// </summary>
+    [DataField]
+    public bool BuckleOnInteractHand = true;
 }
 
 public enum StrapPosition
index 381789f32d68f7ab89f06f77ed004e886e41d92d..7677e800fe96780811e262a97a3242d988577cef 100644 (file)
@@ -84,7 +84,7 @@ public abstract partial class SharedBuckleSystem
         if (!TryComp(args.User, out BuckleComponent? buckle))
             return;
 
-        if (buckle.BuckledTo == null)
+        if (buckle.BuckledTo == null && component.BuckleOnInteractHand)
             TryBuckle(args.User, args.User, uid, buckle, popup: true);
         else if (buckle.BuckledTo == uid)
             TryUnbuckle(args.User, args.User, buckle, popup: true);
index f7b1be8ecdedd561c5b58e9749459c531fd36bf4..965c8261cceb44acefc8973e4f42ffc9e31f066e 100644 (file)
@@ -55,6 +55,7 @@
       rotation: -90
       buckleOffset: "0,0.15"
       unbuckleOffset: "0,0.15"
+      buckleOnInteractHand: False
     - type: Appearance
     - type: GenericVisualizer
       visuals: