mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-04 21:37:27 +00:00
* We meet again, my old friend.
* Helper property
(cherry picked from commit 31207006f5)
25 lines
731 B
C#
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;
|
|
}
|
|
}
|