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:
@@ -16,16 +16,14 @@ using Content.Shared.Tools.Systems;
|
||||
using Content.Shared.Verbs;
|
||||
using Content.Shared.Wall;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Audio;
|
||||
using Content.Shared.ActionBlocker;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Physics.Systems;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Timing;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -47,6 +45,7 @@ public abstract class SharedEntityStorageSystem : EntitySystem
|
||||
[Dependency] protected readonly SharedTransformSystem TransformSystem = default!;
|
||||
[Dependency] private readonly WeldableSystem _weldable = default!;
|
||||
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
|
||||
[Dependency] private readonly ActionBlockerSystem _actionBlocker = default!;
|
||||
|
||||
public const string ContainerName = "entity_storage";
|
||||
|
||||
@@ -132,6 +131,9 @@ public abstract class SharedEntityStorageSystem : EntitySystem
|
||||
if (!HasComp<HandsComponent>(args.Entity))
|
||||
return;
|
||||
|
||||
if (!_actionBlocker.CanMove(args.Entity))
|
||||
return;
|
||||
|
||||
if (_timing.CurTime < component.NextInternalOpenAttempt)
|
||||
return;
|
||||
|
||||
@@ -139,9 +141,7 @@ public abstract class SharedEntityStorageSystem : EntitySystem
|
||||
Dirty(uid, component);
|
||||
|
||||
if (component.OpenOnMove)
|
||||
{
|
||||
TryOpenStorage(args.Entity, uid);
|
||||
}
|
||||
}
|
||||
|
||||
protected void OnFoldAttempt(EntityUid uid, SharedEntityStorageComponent component, ref FoldAttemptEvent args)
|
||||
|
||||
Reference in New Issue
Block a user