Add FTL destinations (#9685)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Shared.Shuttles.Components;
|
||||
using Content.Shared.Shuttles.Systems;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
@@ -7,15 +8,31 @@ namespace Content.Shared.Shuttles.BUIStates;
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class ShuttleConsoleBoundInterfaceState : RadarConsoleBoundInterfaceState
|
||||
{
|
||||
/// <summary>
|
||||
/// The current FTL state.
|
||||
/// </summary>
|
||||
public readonly FTLState FTLState;
|
||||
|
||||
/// <summary>
|
||||
/// When the next FTL state change happens.
|
||||
/// </summary>
|
||||
public readonly TimeSpan FTLTime;
|
||||
public readonly ShuttleMode Mode;
|
||||
public List<(EntityUid Entity, string Destination, bool Enabled)> Destinations;
|
||||
|
||||
public ShuttleConsoleBoundInterfaceState(
|
||||
FTLState ftlState,
|
||||
TimeSpan ftlTime,
|
||||
ShuttleMode mode,
|
||||
List<(EntityUid Entity, string Destination, bool Enabled)> destinations,
|
||||
float maxRange,
|
||||
EntityCoordinates? coordinates,
|
||||
Angle? angle,
|
||||
List<DockingInterfaceState> docks) : base(maxRange, coordinates, angle, docks)
|
||||
{
|
||||
FTLState = ftlState;
|
||||
FTLTime = ftlTime;
|
||||
Destinations = destinations;
|
||||
Mode = mode;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Shuttles.Events;
|
||||
|
||||
/// <summary>
|
||||
/// Raised on the client when it wishes to travel somewhere.
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class ShuttleConsoleDestinationMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public EntityUid Destination;
|
||||
}
|
||||
@@ -4,3 +4,31 @@ public abstract partial class SharedShuttleSystem : EntitySystem
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum FTLState : byte
|
||||
{
|
||||
Invalid = 0,
|
||||
|
||||
/// <summary>
|
||||
/// A dummy state for presentation
|
||||
/// </summary>
|
||||
Available = 1 << 0,
|
||||
|
||||
/// <summary>
|
||||
/// Sound played and launch started
|
||||
/// </summary>
|
||||
Starting = 1 << 1,
|
||||
|
||||
/// <summary>
|
||||
/// When they're on the FTL map
|
||||
/// </summary>
|
||||
Travelling = 1 << 2,
|
||||
|
||||
/// <summary>
|
||||
/// Approaching destination, play effects or whatever,
|
||||
/// </summary>
|
||||
Arriving = 1 << 3,
|
||||
Cooldown = 1 << 4,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user