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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user