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:
@@ -8,6 +8,7 @@ using Content.Shared.Popups;
|
||||
using Content.Shared.Resist;
|
||||
using Content.Shared.Tools.Components;
|
||||
using Content.Shared.Tools.Systems;
|
||||
using Content.Shared.ActionBlocker;
|
||||
|
||||
namespace Content.Server.Resist;
|
||||
|
||||
@@ -18,6 +19,7 @@ public sealed class ResistLockerSystem : EntitySystem
|
||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||
[Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!;
|
||||
[Dependency] private readonly WeldableSystem _weldable = default!;
|
||||
[Dependency] private readonly ActionBlockerSystem _actionBlocker = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -34,6 +36,9 @@ public sealed class ResistLockerSystem : EntitySystem
|
||||
if (!TryComp(uid, out EntityStorageComponent? storageComponent))
|
||||
return;
|
||||
|
||||
if (!_actionBlocker.CanMove(args.Entity))
|
||||
return;
|
||||
|
||||
if (TryComp<LockComponent>(uid, out var lockComponent) && lockComponent.Locked || _weldable.IsWelded(uid))
|
||||
{
|
||||
AttemptResist(args.Entity, uid, storageComponent, component);
|
||||
|
||||
Reference in New Issue
Block a user