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; /// /// Designates this entity as holding a salvage expedition. /// [RegisterComponent, AutoGenerateComponentPause] public sealed partial class SalvageExpeditionComponent : SharedSalvageExpeditionComponent { public SalvageMissionParams MissionParams = default!; /// /// Where the dungeon is located for initial announcement. /// [DataField("dungeonLocation")] public Vector2 DungeonLocation = Vector2.Zero; /// /// When the expeditions ends. /// [ViewVariables(VVAccess.ReadWrite), DataField("endTime", customTypeSerializer: typeof(TimeOffsetSerializer))] [AutoPausedField] public TimeSpan EndTime; /// /// Station whose mission this is. /// [DataField("station")] public EntityUid Station; [ViewVariables] public bool Completed = false; /// /// Countdown audio stream. /// [DataField, AutoNetworkedField] public EntityUid? Stream = null; /// /// Sound that plays when the mission end is imminent. /// [ViewVariables(VVAccess.ReadWrite), DataField] public SoundSpecifier Sound = new SoundCollectionSpecifier("ExpeditionEnd") { Params = AudioParams.Default.WithVolume(-5), }; /// /// Song selected on MapInit so we can predict the audio countdown properly. /// [DataField] public ResolvedSoundSpecifier SelectedSong; }