Fix pressing shift while held triggering escape (#24878)
* We meet again, my old friend. * Helper property (cherry picked from commit 31207006f50d342d2d29c366977ebf4f783a68ea)
This commit is contained in:
parent
fa9861e8c7
commit
b659a3c61a
|
|
@ -11,6 +11,7 @@ using Content.Shared.Hands.EntitySystems;
|
|||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.Movement.Events;
|
||||
using Content.Shared.Movement.Systems;
|
||||
using Content.Shared.Resist;
|
||||
using Content.Shared.Storage;
|
||||
using Robust.Shared.Containers;
|
||||
|
|
@ -43,6 +44,9 @@ public sealed class EscapeInventorySystem : EntitySystem
|
|||
|
||||
private void OnRelayMovement(EntityUid uid, CanEscapeInventoryComponent component, ref MoveInputEvent args)
|
||||
{
|
||||
if (!args.HasDirectionalMovement)
|
||||
return;
|
||||
|
||||
if (!_containerSystem.TryGetContainingContainer(uid, out var container) || !_actionBlockerSystem.CanInteract(uid, container.Owner))
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ public readonly struct MoveInputEvent
|
|||
public readonly InputMoverComponent Component;
|
||||
public readonly MoveButtons OldMovement;
|
||||
|
||||
public bool HasDirectionalMovement => (Component.HeldMoveButtons & MoveButtons.AnyDirection) != MoveButtons.None;
|
||||
|
||||
public MoveInputEvent(EntityUid entity, InputMoverComponent component, MoveButtons oldMovement)
|
||||
{
|
||||
Entity = entity;
|
||||
|
|
|
|||
Loading…
Reference in New Issue