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. /// [ViewVariables(VVAccess.ReadWrite)] public float BaseMaxLinearVelocity = 23.07f; //Frontier 60 - 23.07. Upstream has it set to 60 to test and for collisions currently. Also, for some reason this value is increased by 30%, not sure if parts related or otherwise, so we do a 23.07 to reach a tier 1 velocity of 30. public const float MaxAngularVelocity = 4f; /// /// The cached thrust available for each cardinal direction /// [ViewVariables] public readonly float[] LinearThrust = new float[4]; /// /// The cached thrust available for each cardinal direction, if all thrusters are T1 /// [ViewVariables] public readonly float[] BaseLinearThrust = 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; /// /// Base damping modifier applied to the shuttle's physics component when not in FTL. /// [DataField] public float BodyModifier = 0.25f; /// /// Final Damping Modifier for a shuttle. /// This value is set to 0 during FTL. And to BodyModifier when not in FTL. /// [DataField] public float DampingModifier; // /// /// Limit to max velocity set by a shuttle console. /// [DataField] public float SetMaxVelocity = 100f; /// /// At what Thrust-Weight-Ratio should this ship have the base max velocity as its maximum velocity. /// [DataField] public float BaseMaxVelocityTWR = 2f; /// /// How much should TWR affect max velocity. /// [DataField] public float MaxVelocityScalingExponent = 0.25f; // 16x thrust = 2x max speed /// /// Don't allow max velocity to go beyond this value. /// [DataField] public float UpperMaxVelocity = 100f; // } }