This commit is contained in:
rhailrake
2023-09-08 18:29:57 +06:00
committed by Aviu00
parent 56980a73da
commit b52c223a5d
2 changed files with 12 additions and 0 deletions

View File

@@ -437,6 +437,9 @@ public abstract partial class SharedBuckleSystem
if (HasComp<SleepingComponent>(buckleUid) && buckleUid == userUid)
return false;
if (ActionBlocker.CanInteract(userUid, buckleUid) == false)
return false;
// If the strap is a vehicle and the rider is not the person unbuckling, return. Unless the rider is crit or dead.
if (TryComp<VehicleComponent>(strapUid, out var vehicle) && vehicle.Rider != userUid && !_mobState.IsIncapacitated(buckleUid))
return false;