61 lines
1.8 KiB
C#
61 lines
1.8 KiB
C#
using System.Numerics;
|
|
using Content.Shared.Salvage;
|
|
using Content.Shared.Salvage.Expeditions;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
|
|
|
namespace Content.Server.Salvage.Expeditions;
|
|
|
|
/// <summary>
|
|
/// Designates this entity as holding a salvage expedition.
|
|
/// </summary>
|
|
[RegisterComponent, AutoGenerateComponentPause]
|
|
public sealed partial class SalvageExpeditionComponent : SharedSalvageExpeditionComponent
|
|
{
|
|
public SalvageMissionParams MissionParams = default!;
|
|
|
|
/// <summary>
|
|
/// Where the dungeon is located for initial announcement.
|
|
/// </summary>
|
|
[DataField("dungeonLocation")]
|
|
public Vector2 DungeonLocation = Vector2.Zero;
|
|
|
|
/// <summary>
|
|
/// When the expeditions ends.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("endTime", customTypeSerializer: typeof(TimeOffsetSerializer))]
|
|
[AutoPausedField]
|
|
public TimeSpan EndTime;
|
|
|
|
/// <summary>
|
|
/// Station whose mission this is.
|
|
/// </summary>
|
|
[DataField("station")]
|
|
public EntityUid Station;
|
|
|
|
[ViewVariables] public bool Completed = false;
|
|
|
|
/// <summary>
|
|
/// Countdown audio stream.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public EntityUid? Stream = null;
|
|
|
|
/// <summary>
|
|
/// Sound that plays when the mission end is imminent.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite), DataField]
|
|
public SoundSpecifier Sound = new SoundCollectionSpecifier("ExpeditionEnd")
|
|
{
|
|
Params = AudioParams.Default.WithVolume(-5),
|
|
};
|
|
|
|
/// <summary>
|
|
/// Song selected on MapInit so we can predict the audio countdown properly.
|
|
/// </summary>
|
|
[DataField]
|
|
public ResolvedSoundSpecifier SelectedSong;
|
|
}
|