mirror of
https://github.com/wega-team/ss14-wega.git
synced 2026-02-15 03:31:44 +01:00
* seperate out shuttle cooldowns * fix * feedback * fix spacing * update to TimeSpan * GOAT float * return to TimeSpan * add var * clarify with seconds * clarifying some things
80 lines
2.4 KiB
C#
80 lines
2.4 KiB
C#
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];
|
|
|
|
/// <summary>
|
|
/// Thrust gets multiplied by this value if it's for braking.
|
|
/// </summary>
|
|
public const float BrakeCoefficient = 1.5f;
|
|
|
|
/// <summary>
|
|
/// Maximum velocity.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float BaseMaxLinearVelocity = 60f;
|
|
|
|
public const float MaxAngularVelocity = 4f;
|
|
|
|
/// <summary>
|
|
/// The cached thrust available for each cardinal direction
|
|
/// </summary>
|
|
[ViewVariables]
|
|
public readonly float[] LinearThrust = new float[4];
|
|
|
|
/// <summary>
|
|
/// The thrusters contributing to each direction for impulse.
|
|
/// </summary>
|
|
// No touchy
|
|
public readonly List<EntityUid>[] LinearThrusters = new List<EntityUid>[]
|
|
{
|
|
new(),
|
|
new(),
|
|
new(),
|
|
new(),
|
|
};
|
|
|
|
/// <summary>
|
|
/// The thrusters contributing to the angular impulse of the shuttle.
|
|
/// </summary>
|
|
public readonly List<EntityUid> AngularThrusters = new();
|
|
|
|
[ViewVariables]
|
|
public float AngularThrust = 0f;
|
|
|
|
/// <summary>
|
|
/// A bitmask of all the directions we are considered thrusting.
|
|
/// </summary>
|
|
[ViewVariables]
|
|
public DirectionFlag ThrustDirections = DirectionFlag.None;
|
|
|
|
/// <summary>
|
|
/// Base damping modifier applied to the shuttle's physics component when not in FTL.
|
|
/// </summary>
|
|
[DataField]
|
|
public float BodyModifier = 0.25f;
|
|
|
|
/// <summary>
|
|
/// Final Damping Modifier for a shuttle.
|
|
/// This value is set to 0 during FTL. And to BodyModifier when not in FTL.
|
|
/// </summary>
|
|
[DataField]
|
|
public float DampingModifier;
|
|
|
|
/// <summary>
|
|
/// Optional override for the FTL cooldown for this shuttle.
|
|
/// If not null, then the value will be used instead of the shuttle.cooldown CCVar.
|
|
/// </summary>
|
|
[DataField]
|
|
public TimeSpan? FTLCooldownOverride = null;
|
|
}
|
|
}
|