MoveInputEvent.cs 872 B

123456789101112131415161718192021222324252627
  1. using Content.Shared.Movement.Components;
  2. using Content.Shared.Movement.Systems;
  3. namespace Content.Shared.Movement.Events;
  4. /// <summary>
  5. /// Raised on an entity whenever it has a movement input change.
  6. /// </summary>
  7. [ByRefEvent]
  8. public readonly struct MoveInputEvent
  9. {
  10. public readonly Entity<InputMoverComponent> Entity;
  11. public readonly MoveButtons OldMovement;
  12. public readonly Direction Dir; // Shitmed Change
  13. public readonly bool State; // Shitmed Change
  14. public bool HasDirectionalMovement => (Entity.Comp.HeldMoveButtons & MoveButtons.AnyDirection) != MoveButtons.None;
  15. public MoveInputEvent(Entity<InputMoverComponent> entity, MoveButtons oldMovement, Direction dir, bool state) // Shitmed Change
  16. {
  17. Entity = entity;
  18. OldMovement = oldMovement;
  19. // Shitmed Change
  20. Dir = dir;
  21. State = state;
  22. }
  23. }