mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 13:37:47 +03:00
# Description Goddamn do I love Adderall. This PR lays the entire groundwork needed for the "Glacier Rework", and it does so by fixing every problem I could think of between FTL and StationBiome that was preventing it from being a reality. Essentially, I'm hitting several birds with one stone by refactoring both systems to be a LOT more flexible. You can technically say that this basically is also partly enabling Lavaland maps, since I conveniently included options in the StationBiomeComponent to generate dungeons. Technically a planet map should probably also have a RestrictedRangeComponent added to it so that players can't wander so far from the station that they generate a truly excessive number of entities. Yes, this does infact mean you can now run Nukie gamemodes on planet maps. <details><summary><h1>Media</h1></summary> <p> https://github.com/user-attachments/assets/7a3730af-c521-42d4-8abd-5aa5989c369c </p> </details> --- # Changelog 🆑 - add: Shuttles can now take off and land from planet surfaces. They however will still respect exclusion zone beacons set by stations. Maybe in the future there might be a special shuttle (drop pod) that is set to ignore these exclusion zones. --------- Signed-off-by: VMSolidus <evilexecutive@gmail.com> Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> (cherry picked from commit fb4ca1af6a48eda92f15b5a70273e27c2c352f22)
81 lines
2.5 KiB
C#
81 lines
2.5 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 assuming unupgraded, tier 1 thrusters
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float BaseMaxLinearVelocity = 20f;
|
|
|
|
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>
|
|
/// Damping applied to the shuttle's physics component when not in FTL.
|
|
/// </summary>
|
|
[DataField("linearDamping"), ViewVariables(VVAccess.ReadWrite)]
|
|
public float LinearDamping = 0.05f;
|
|
|
|
[DataField("angularDamping"), ViewVariables(VVAccess.ReadWrite)]
|
|
public float AngularDamping = 0.05f;
|
|
|
|
/// <summary>
|
|
/// How far from the shuttle's bounding box will it crush and destroy things?
|
|
/// </summary>
|
|
[DataField]
|
|
public float SmimshDistance = 0.2f;
|
|
|
|
/// <summary>
|
|
/// Whether or not the shuttle calls the DoTheDinosaur function upon FTL'ing. I'm not explaining this, you owe it to yourself to do a code search for it.
|
|
/// </summary>
|
|
[DataField]
|
|
public bool DoTheDinosaur = true;
|
|
}
|
|
}
|