Remove Walking out of Containers while You can't Walk (#30391)

* Require Standing to Exit Containers

* whoops, forgot a not

* You can't walk out if cuffed

* GUAH(requested stuff)

* bwomp(tiny cleanup)
This commit is contained in:
Cojoke
2024-07-30 08:53:44 -05:00
committed by GitHub
parent 04b7b80210
commit 247222beab
4 changed files with 18 additions and 10 deletions

View File

@@ -25,7 +25,6 @@ using Content.Shared.Interaction;
using Content.Shared.Item;
using Content.Shared.Movement.Events;
using Content.Shared.Popups;
using Content.Shared.Throwing;
using Content.Shared.Verbs;
using Robust.Server.Audio;
using Robust.Server.GameObjects;
@@ -35,7 +34,6 @@ using Robust.Shared.Map.Components;
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Events;
using Robust.Shared.Player;
using Robust.Shared.Random;
using Robust.Shared.Utility;
namespace Content.Server.Disposal.Unit.EntitySystems;
@@ -331,12 +329,13 @@ public sealed class DisposalUnitSystem : SharedDisposalUnitSystem
{
var currentTime = GameTiming.CurTime;
if (!_actionBlockerSystem.CanMove(args.Entity))
return;
if (!TryComp(args.Entity, out HandsComponent? hands) ||
hands.Count == 0 ||
currentTime < component.LastExitAttempt + ExitAttemptDelay)
{
return;
}
component.LastExitAttempt = currentTime;
Remove(uid, component, args.Entity);