Add FTL destinations (#9685)

This commit is contained in:
metalgearsloth
2022-07-15 14:11:41 +10:00
committed by GitHub
parent 5e1d019f17
commit 1251b3aeda
34 changed files with 9133 additions and 227 deletions

View File

@@ -0,0 +1,52 @@
using Content.Shared.Shuttles.Systems;
using Content.Shared.Sound;
using Robust.Shared.Audio;
using Robust.Shared.Map;
namespace Content.Server.Shuttles.Components;
/// <summary>
/// Added to a component when it is queued or is travelling via FTL.
/// </summary>
[RegisterComponent]
public sealed class FTLComponent : Component
{
[ViewVariables]
public FTLState State = FTLState.Available;
[ViewVariables(VVAccess.ReadWrite)]
public float StartupTime = 0f;
[ViewVariables(VVAccess.ReadWrite)]
public float TravelTime = 0f;
[ViewVariables(VVAccess.ReadWrite)]
public float Accumulator = 0f;
/// <summary>
/// Target Uid to dock with at the end of FTL.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("targetUid")]
public EntityUid? TargetUid;
[ViewVariables(VVAccess.ReadWrite), DataField("targetCoordinates")]
public EntityCoordinates TargetCoordinates;
/// <summary>
/// Should we dock with the target when arriving or show up nearby.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("dock")]
public bool Dock;
[ViewVariables(VVAccess.ReadWrite), DataField("soundTravel")]
public SoundSpecifier? TravelSound = new SoundPathSpecifier("/Audio/Effects/Shuttle/hyperspace_progress.ogg")
{
Params =
{
Volume = -10,
Loop = true,
}
};
public IPlayingAudioStream? TravelStream;
}