Files
tbd-station-14/Content.Shared/Movement/Events/MoveInputEvent.cs
Tayrtahn 31207006f5 Fix pressing shift while held triggering escape (#24878)
* We meet again, my old friend.

* Helper property
2024-02-03 13:14:20 +11:00

25 lines
731 B
C#

using Content.Shared.Movement.Components;
using Content.Shared.Movement.Systems;
namespace Content.Shared.Movement.Events;
/// <summary>
/// Raised on an entity whenever it has a movement input change.
/// </summary>
[ByRefEvent]
public readonly struct MoveInputEvent
{
public readonly EntityUid Entity;
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;
Component = component;
OldMovement = oldMovement;
}
}