Evac shuttle (#8931)

Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2022-06-26 15:20:45 +10:00
committed by GitHub
parent f647c8a658
commit 521ed99766
73 changed files with 5336 additions and 188 deletions

View File

@@ -0,0 +1,7 @@
namespace Content.Server.Shuttles.Components;
/// <summary>
/// Given priority when considering where to dock an emergency shuttle.
/// </summary>
[RegisterComponent]
public sealed class EmergencyDockComponent : Component {}

View File

@@ -0,0 +1,16 @@
namespace Content.Server.Shuttles.Components;
[RegisterComponent]
public sealed class EmergencyShuttleConsoleComponent : Component
{
// TODO: Okay doing it by string is kinda suss but also ID card tracking doesn't seem to be robust enough
/// <summary>
/// ID cards that have been used to authorize an early launch.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("authorized")]
public HashSet<string> AuthorizedEntities = new();
[ViewVariables(VVAccess.ReadWrite), DataField("authorizationsRequired")]
public int AuthorizationsRequired = 3;
}

View File

@@ -0,0 +1,31 @@
using Robust.Shared.Map;
namespace Content.Server.Shuttles.Components;
/// <summary>
/// Added to a component when it is queued or is travelling through hyperspace
/// </summary>
[RegisterComponent]
public sealed class HyperspaceComponent : Component
{
[ViewVariables]
public HyperspaceState State = HyperspaceState.Starting;
[ViewVariables(VVAccess.ReadWrite)]
public float StartupTime = 0f;
[ViewVariables(VVAccess.ReadWrite)]
public float TravelTime = 0f;
[ViewVariables(VVAccess.ReadWrite)]
public float Accumulator = 0f;
[ViewVariables(VVAccess.ReadWrite), DataField("targetCoordinates")]
public EntityCoordinates TargetCoordinates;
}
public enum HyperspaceState : byte
{
Starting,
Travelling,
}

View File

@@ -5,6 +5,12 @@ namespace Content.Server.Shuttles.Components
[RegisterComponent]
public sealed class ShuttleComponent : Component
{
/// <summary>
/// Should controls be enabled or disabled on this shuttle.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public bool CanPilot = true;
[ViewVariables]
public bool Enabled = true;

View File

@@ -5,6 +5,12 @@ namespace Content.Server.Shuttles.Components
[RegisterComponent]
public sealed class ShuttleConsoleComponent : SharedShuttleConsoleComponent
{
/// <summary>
/// Set by shuttlesystem if the grid should no longer be pilotable.
/// </summary>
[ViewVariables]
public bool CanPilot = true;
[ViewVariables]
public readonly List<PilotComponent> SubscribedPilots = new();