Skip to content

Commit

Permalink
Fix unbuckling others when clicking on the strap entity (#29998)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ShadowCommander authored and sleepyyapril committed Nov 15, 2024
1 parent 2230a2c commit 42c62ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Content.Shared/Buckle/Components/StrapComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ public sealed partial class StrapComponent : Component
/// </summary>
[DataField]
public ProtoId<AlertPrototype> BuckledAlertType = "Buckled";

/// <summary>
/// Whether InteractHand will buckle the user to the strap.
/// </summary>
[DataField]
public bool BuckleOnInteractHand = true;
}

public enum StrapPosition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
rotation: -90
buckleOffset: "0,0.15"
unbuckleOffset: "0,0.15"
buckleOnInteractHand: False
- type: Appearance
- type: GenericVisualizer
visuals:
Expand Down

0 comments on commit 42c62ce

Please sign in to comment.