2022-06-26 15:20:45 +10:00
|
|
|
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;
|
|
|
|
|
|
2022-06-27 15:11:39 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Target Uid to dock with at the end of hyperspace.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("targetUid")]
|
|
|
|
|
public EntityUid? TargetUid;
|
|
|
|
|
|
2022-06-26 15:20:45 +10:00
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("targetCoordinates")]
|
|
|
|
|
public EntityCoordinates TargetCoordinates;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum HyperspaceState : byte
|
|
|
|
|
{
|
|
|
|
|
Starting,
|
|
|
|
|
Travelling,
|
|
|
|
|
}
|