PilotComponent.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System.Numerics;
  2. using Content.Shared.Alert;
  3. using Content.Shared.Movement.Systems;
  4. using Robust.Shared.GameStates;
  5. using Robust.Shared.Map;
  6. using Robust.Shared.Prototypes;
  7. using Robust.Shared.Timing;
  8. namespace Content.Shared.Shuttles.Components
  9. {
  10. /// <summary>
  11. /// Stores what shuttle this entity is currently piloting.
  12. /// </summary>
  13. [RegisterComponent]
  14. [NetworkedComponent]
  15. public sealed partial class PilotComponent : Component
  16. {
  17. [ViewVariables]
  18. public EntityUid? Console { get; set; }
  19. /// <summary>
  20. /// Where we started piloting from to check if we should break from moving too far.
  21. /// </summary>
  22. [ViewVariables]
  23. public EntityCoordinates? Position { get; set; }
  24. public Vector2 CurTickStrafeMovement = Vector2.Zero;
  25. public float CurTickRotationMovement;
  26. public float CurTickBraking;
  27. public GameTick LastInputTick = GameTick.Zero;
  28. public ushort LastInputSubTick = 0;
  29. [ViewVariables]
  30. public ShuttleButtons HeldButtons = ShuttleButtons.None;
  31. [DataField]
  32. public ProtoId<AlertPrototype> PilotingAlert = "PilotingShuttle";
  33. public override bool SendOnlyToOwner => true;
  34. }
  35. public sealed partial class StopPilotingAlertEvent : BaseAlertEvent;
  36. }