From 42c62ce9dee1a27bd69ad23e398afd05a661370f Mon Sep 17 00:00:00 2001 From: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> Date: Sun, 25 Aug 2024 10:09:51 -0700 Subject: [PATCH] Fix unbuckling others when clicking on the strap entity (#29998) * Add failing unbuckle InteractHand test * Skip trybuckle if strap doesn't have space * Unbuckle others not just user * Fix test failing due to delay * Change to raise event instead of calling OnInteractHand * Add test for buckle and unbuckle on InteractHand * Add tick delay * Remove unneeded tick delay and clean up * Comment code * Cleanup * Swap to fastest checks first * Fix reading empty sequence when there are no buckled entities --- Content.Shared/Buckle/Components/StrapComponent.cs | 6 ++++++ .../Prototypes/Entities/Structures/Furniture/rollerbeds.yml | 1 + 2 files changed, 7 insertions(+) diff --git a/Content.Shared/Buckle/Components/StrapComponent.cs b/Content.Shared/Buckle/Components/StrapComponent.cs index a16d15f8a2c..0fbdae693de 100644 --- a/Content.Shared/Buckle/Components/StrapComponent.cs +++ b/Content.Shared/Buckle/Components/StrapComponent.cs @@ -84,6 +84,12 @@ public sealed partial class StrapComponent : Component /// [DataField] public ProtoId BuckledAlertType = "Buckled"; + + /// + /// Whether InteractHand will buckle the user to the strap. + /// + [DataField] + public bool BuckleOnInteractHand = true; } public enum StrapPosition diff --git a/Resources/Prototypes/Entities/Structures/Furniture/rollerbeds.yml b/Resources/Prototypes/Entities/Structures/Furniture/rollerbeds.yml index b3cfe6ade3f..1cfe98f0f65 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: