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>
|
/// </summary>
|
||||||
[DataField]
|
[DataField]
|
||||||
public float BuckleDoafterTime = 2f;
|
public float BuckleDoafterTime = 2f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether InteractHand will buckle the user to the strap.
|
||||||
|
/// </summary>
|
||||||
|
[DataField]
|
||||||
|
public bool BuckleOnInteractHand = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum StrapPosition
|
public enum StrapPosition
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public abstract partial class SharedBuckleSystem
|
|||||||
if (!TryComp(args.User, out BuckleComponent? buckle))
|
if (!TryComp(args.User, out BuckleComponent? buckle))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (buckle.BuckledTo == null)
|
if (buckle.BuckledTo == null && component.BuckleOnInteractHand)
|
||||||
TryBuckle(args.User, args.User, uid, buckle, popup: true);
|
TryBuckle(args.User, args.User, uid, buckle, popup: true);
|
||||||
else if (buckle.BuckledTo == uid)
|
else if (buckle.BuckledTo == uid)
|
||||||
TryUnbuckle(args.User, args.User, buckle, popup: true);
|
TryUnbuckle(args.User, args.User, buckle, popup: true);
|
||||||
|
|||||||
@@ -55,6 +55,7 @@
|
|||||||
rotation: -90
|
rotation: -90
|
||||||
buckleOffset: "0,0.15"
|
buckleOffset: "0,0.15"
|
||||||
unbuckleOffset: "0,0.15"
|
unbuckleOffset: "0,0.15"
|
||||||
|
buckleOnInteractHand: False
|
||||||
- type: Appearance
|
- type: Appearance
|
||||||
- type: GenericVisualizer
|
- type: GenericVisualizer
|
||||||
visuals:
|
visuals:
|
||||||
|
|||||||
Reference in New Issue
Block a user