Files
OldThink/Content.Server/Salvage/Expeditions/SalvageExpeditionComponent.cs
Pieter-Jan Briers e00f74505c Use new ComponentPauseGenerator (#25183)
Also includes some (non critical) changes to the solution file to re-organize the Roslyn components.
2024-02-26 14:36:19 +11:00

54 lines
1.6 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>
public EntityUid? Stream = null;
/// <summary>
/// Sound that plays when the mission end is imminent.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("sound")]
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Misc/tension_session.ogg")
{
Params = AudioParams.Default.WithVolume(-5),
};
}