2021-11-21 17:09:49 +11:00
|
|
|
using Content.Shared.Shuttles.Components;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Shuttles.Components
|
|
|
|
|
{
|
|
|
|
|
[RegisterComponent]
|
2022-06-16 15:28:16 +10:00
|
|
|
public sealed class ShuttleComponent : Component
|
2021-11-21 17:09:49 +11:00
|
|
|
{
|
2022-06-26 15:20:45 +10:00
|
|
|
/// <summary>
|
|
|
|
|
/// Should controls be enabled or disabled on this shuttle.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public bool CanPilot = true;
|
|
|
|
|
|
2022-06-16 15:28:16 +10:00
|
|
|
[ViewVariables]
|
|
|
|
|
public bool Enabled = true;
|
|
|
|
|
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
public ShuttleMode Mode = ShuttleMode.Cruise;
|
|
|
|
|
|
2021-11-21 17:09:49 +11:00
|
|
|
/// <summary>
|
2022-03-07 02:03:53 -03:00
|
|
|
/// The cached thrust available for each cardinal direction
|
2021-11-21 17:09:49 +11:00
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables]
|
2022-03-07 02:03:53 -03:00
|
|
|
public readonly float[] LinearThrust = new float[4];
|
2021-11-21 17:09:49 +11:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The thrusters contributing to each direction for impulse.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public readonly List<ThrusterComponent>[] LinearThrusters = new List<ThrusterComponent>[4];
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The thrusters contributing to the angular impulse of the shuttle.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public readonly List<ThrusterComponent> AngularThrusters = new List<ThrusterComponent>();
|
|
|
|
|
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
public float AngularThrust = 0f;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A bitmask of all the directions we are considered thrusting.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
public DirectionFlag ThrustDirections = DirectionFlag.None;
|
|
|
|
|
}
|
|
|
|
|
}
|