2023-07-08 14:08:32 +10:00
|
|
|
using System.Numerics;
|
2024-05-23 22:43:04 -04:00
|
|
|
using Content.Shared.Alert;
|
2022-10-22 12:50:14 +13:00
|
|
|
using Content.Shared.Movement.Systems;
|
2021-07-21 21:15:12 +10:00
|
|
|
using Robust.Shared.GameStates;
|
2021-11-11 18:42:34 +11:00
|
|
|
using Robust.Shared.Map;
|
2024-05-23 22:43:04 -04:00
|
|
|
using Robust.Shared.Prototypes;
|
2022-07-16 13:51:52 +10:00
|
|
|
using Robust.Shared.Timing;
|
2021-07-21 21:15:12 +10:00
|
|
|
|
2021-11-21 17:09:49 +11:00
|
|
|
namespace Content.Shared.Shuttles.Components
|
2021-07-21 21:15:12 +10:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Stores what shuttle this entity is currently piloting.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent]
|
2021-11-11 18:42:34 +11:00
|
|
|
[NetworkedComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class PilotComponent : Component
|
2021-07-21 21:15:12 +10:00
|
|
|
{
|
2023-07-08 09:02:17 -07:00
|
|
|
[ViewVariables]
|
|
|
|
|
public EntityUid? Console { get; set; }
|
2021-07-21 21:15:12 +10:00
|
|
|
|
2021-11-11 18:42:34 +11:00
|
|
|
/// <summary>
|
|
|
|
|
/// Where we started piloting from to check if we should break from moving too far.
|
|
|
|
|
/// </summary>
|
2023-07-08 09:02:17 -07:00
|
|
|
[ViewVariables]
|
|
|
|
|
public EntityCoordinates? Position { get; set; }
|
2021-11-11 18:42:34 +11:00
|
|
|
|
2022-07-16 13:51:52 +10:00
|
|
|
public Vector2 CurTickStrafeMovement = Vector2.Zero;
|
|
|
|
|
public float CurTickRotationMovement;
|
|
|
|
|
public float CurTickBraking;
|
|
|
|
|
|
|
|
|
|
public GameTick LastInputTick = GameTick.Zero;
|
|
|
|
|
public ushort LastInputSubTick = 0;
|
|
|
|
|
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
public ShuttleButtons HeldButtons = ShuttleButtons.None;
|
2022-09-14 21:40:05 +12:00
|
|
|
|
2024-05-23 22:43:04 -04:00
|
|
|
[DataField]
|
|
|
|
|
public ProtoId<AlertPrototype> PilotingAlert = "PilotingShuttle";
|
|
|
|
|
|
2022-09-14 21:40:05 +12:00
|
|
|
public override bool SendOnlyToOwner => true;
|
2021-07-21 21:15:12 +10:00
|
|
|
}
|
2024-08-07 01:15:35 -04:00
|
|
|
|
|
|
|
|
public sealed partial class StopPilotingAlertEvent : BaseAlertEvent;
|
2021-07-21 21:15:12 +10:00
|
|
|
}
|