Add a bool to disable buckling on InteractHand (#30001)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
rotation: -90
|
||||
buckleOffset: "0,0.15"
|
||||
unbuckleOffset: "0,0.15"
|
||||
buckleOnInteractHand: False
|
||||
- type: Appearance
|
||||
- type: GenericVisualizer
|
||||
visuals:
|
||||
|
||||
Reference in New Issue
Block a user