using System.Numerics;
namespace Content.Server.Shuttles.Components
{
[RegisterComponent]
public sealed partial class ShuttleComponent : Component
{
[ViewVariables]
public bool Enabled = true;
[ViewVariables]
public Vector2[] CenterOfThrust = new Vector2[4];
///
/// Thrust gets multiplied by this value if it's for braking.
///
public const float BrakeCoefficient = 1.5f;
///
/// Maximum velocity assuming unupgraded, tier 1 thrusters
///
[ViewVariables(VVAccess.ReadWrite)]
public float BaseMaxLinearVelocity = 20f;
public const float MaxAngularVelocity = 4f;
///
/// The cached thrust available for each cardinal direction
///
[ViewVariables]
public readonly float[] LinearThrust = new float[4];
///
/// The thrusters contributing to each direction for impulse.
///
// No touchy
public readonly List[] LinearThrusters = new List[]
{
new(),
new(),
new(),
new(),
};
///
/// The thrusters contributing to the angular impulse of the shuttle.
///
public readonly List AngularThrusters = new();
[ViewVariables]
public float AngularThrust = 0f;
///
/// A bitmask of all the directions we are considered thrusting.
///
[ViewVariables]
public DirectionFlag ThrustDirections = DirectionFlag.None;
///
/// Damping applied to the shuttle's physics component when not in FTL.
///
[DataField("linearDamping"), ViewVariables(VVAccess.ReadWrite)]
public float LinearDamping = 0.05f;
[DataField("angularDamping"), ViewVariables(VVAccess.ReadWrite)]
public float AngularDamping = 0.05f;
}
}