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

@@ -1,3 +1,4 @@
using Content.Shared.ActionBlocker;
using Content.Shared.Burial;
using Content.Shared.Burial.Components;
using Content.Shared.DoAfter;
@@ -8,7 +9,6 @@ using Content.Shared.Popups;
using Content.Shared.Storage.Components;
using Content.Shared.Storage.EntitySystems;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Player;
namespace Content.Server.Burial.Systems;
@@ -18,6 +18,7 @@ public sealed class BurialSystem : EntitySystem
[Dependency] private readonly SharedEntityStorageSystem _storageSystem = default!;
[Dependency] private readonly SharedAudioSystem _audioSystem = default!;
[Dependency] private readonly SharedPopupSystem _popupSystem = default!;
[Dependency] private readonly ActionBlockerSystem _actionBlocker = default!;
public override void Initialize()
{
@@ -162,6 +163,9 @@ public sealed class BurialSystem : EntitySystem
if (component.HandDiggingDoAfter != null)
return;
if (!_actionBlocker.CanMove(args.Entity))
return;
var doAfterEventArgs = new DoAfterArgs(EntityManager, args.Entity, component.DigDelay / component.DigOutByHandModifier, new GraveDiggingDoAfterEvent(), uid, target: uid)
{
NeedHand = false,