mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
This does cause it to warp onto the wrong airlock (at arrivals), but that's a map issue. (Yes, I tested it) # Changelog <!-- You can add an author after the `🆑` to change the name that appears in the changelog (ex: `🆑 Death`) Leaving it blank will default to your GitHub display name This includes all available types for the changelog --> 🆑 - fix: Fixes arrivals destroying all nearby doors/walls/etc. --------- Co-authored-by: Plykiya <58439124+Plykiya@users.noreply.github.com> Co-authored-by: MilenVolf <63782763+MilenVolf@users.noreply.github.com> Co-authored-by: Gansu <68031780+GansuLalan@users.noreply.github.com> Co-authored-by: aa5g21 <aa5g21@soton.ac.uk> Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> (cherry picked from commit cc858242c5c2d75faa09169f85ca50043dc4ea7c)
65 lines
1.9 KiB
C#
65 lines
1.9 KiB
C#
using Content.Shared.Shuttles.Systems;
|
|
using Content.Shared.Tag;
|
|
using Content.Shared.Timing;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Map;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.Shuttles.Components;
|
|
|
|
/// <summary>
|
|
/// Added to a component when it is queued or is travelling via FTL.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
public sealed partial class FTLComponent : Component
|
|
{
|
|
// TODO Full game save / add datafields
|
|
|
|
[ViewVariables]
|
|
public FTLState State = FTLState.Available;
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public StartEndTime StateTime;
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float StartupTime = 0f;
|
|
|
|
// Because of sphagetti, actual travel time is Math.Max(TravelTime, DefaultArrivalTime)
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float TravelTime = 0f;
|
|
|
|
[DataField]
|
|
public EntProtoId? VisualizerProto = "FtlVisualizerEntity";
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public EntityUid? VisualizerEntity;
|
|
|
|
/// <summary>
|
|
/// Coordinates to arrive it: May be relative to another grid (for docking) or map coordinates.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public EntityCoordinates TargetCoordinates;
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public Angle TargetAngle;
|
|
|
|
/// <summary>
|
|
/// If we're docking after FTL what is the prioritised dock tag (if applicable).
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField]
|
|
public ProtoId<TagPrototype>? PriorityTag;
|
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("soundTravel")]
|
|
public SoundSpecifier? TravelSound = new SoundPathSpecifier("/Audio/DeltaV/Effects/Shuttle/hyperspace_progress.ogg") // DeltaV - Replace FTL sound
|
|
{
|
|
Params = AudioParams.Default.WithVolume(-3f).WithLoop(true)
|
|
};
|
|
|
|
[DataField]
|
|
public EntityUid? StartupStream;
|
|
|
|
[DataField]
|
|
public EntityUid? TravelStream;
|
|
}
|