This commit is contained in:
Rane
2022-07-27 00:46:24 -04:00
committed by GitHub
parent 963ddd507b
commit 1c8bdaf7c4
53 changed files with 698 additions and 36 deletions

View File

@@ -18,6 +18,7 @@ using Robust.Shared.Containers;
using Robust.Shared.Player;
using Robust.Shared.Timing;
using Content.Shared.IdentityManagement;
using Content.Shared.Bed.Sleep;
namespace Content.Server.Buckle.Components
{
@@ -264,6 +265,9 @@ namespace Content.Server.Buckle.Components
{
return false;
}
if (EntMan.TryGetComponent<SleepingComponent>(Owner, out var sleeping) && Owner == user)
return false;
// If the strap is a vehicle and the rider is not the person unbuckling, return.
if (EntMan.TryGetComponent<VehicleComponent>(oldBuckledTo.Owner, out var vehicle) &&
vehicle.Rider != user)