From: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> Date: Sun, 25 Aug 2024 17:09:51 +0000 (-0700) Subject: Add a bool to disable buckling on InteractHand (#30001) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=5c0753b1362728a99c256cbe31fefaefcb7569d9;p=space-station-14.git Add a bool to disable buckling on InteractHand (#30001) --- diff --git a/Content.Shared/Buckle/Components/StrapComponent.cs b/Content.Shared/Buckle/Components/StrapComponent.cs index b8186e2b79..101c388a8b 100644 --- a/Content.Shared/Buckle/Components/StrapComponent.cs +++ b/Content.Shared/Buckle/Components/StrapComponent.cs @@ -90,6 +90,12 @@ public sealed partial class StrapComponent : Component /// [DataField] public float BuckleDoafterTime = 2f; + + /// + /// Whether InteractHand will buckle the user to the strap. + /// + [DataField] + public bool BuckleOnInteractHand = true; } public enum StrapPosition diff --git a/Content.Shared/Buckle/SharedBuckleSystem.Interaction.cs b/Content.Shared/Buckle/SharedBuckleSystem.Interaction.cs index 381789f32d..7677e800fe 100644 --- a/Content.Shared/Buckle/SharedBuckleSystem.Interaction.cs +++ b/Content.Shared/Buckle/SharedBuckleSystem.Interaction.cs @@ -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); diff --git a/Resources/Prototypes/Entities/Structures/Furniture/rollerbeds.yml b/Resources/Prototypes/Entities/Structures/Furniture/rollerbeds.yml index f7b1be8ecd..965c8261cc 100644 --- a/Resources/Prototypes/Entities/Structures/Furniture/rollerbeds.yml +++ b/Resources/Prototypes/Entities/Structures/Furniture/rollerbeds.yml @@ -55,6 +55,7 @@ rotation: -90 buckleOffset: "0,0.15" unbuckleOffset: "0,0.15" + buckleOnInteractHand: False - type: Appearance - type: GenericVisualizer visuals: