Files
wwdpublic/Content.Shared/Movement/Events/MoveInputEvent.cs
2025-04-20 11:15:45 +07:00

28 lines
872 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 Entity<InputMoverComponent> Entity;
public readonly MoveButtons OldMovement;
public readonly Direction Dir; // Shitmed Change
public readonly bool State; // Shitmed Change
public bool HasDirectionalMovement => (Entity.Comp.HeldMoveButtons & MoveButtons.AnyDirection) != MoveButtons.None;
public MoveInputEvent(Entity<InputMoverComponent> entity, MoveButtons oldMovement, Direction dir, bool state) // Shitmed Change
{
Entity = entity;
OldMovement = oldMovement;
// Shitmed Change
Dir = dir;
State = state;
}
}