2025-02-09 17:18:24 +03:00
|
|
|
using Robust.Shared.Audio;
|
2025-05-24 19:21:05 +02:00
|
|
|
using Robust.Shared.GameStates;
|
2025-02-09 17:18:24 +03:00
|
|
|
|
|
|
|
|
namespace Content.Shared._CP14.Demiplane.Components;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Destroy demiplane after time
|
|
|
|
|
/// </summary>
|
2025-05-24 19:21:05 +02:00
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, AutoGenerateComponentPause, Access(typeof(CP14SharedDemiplaneSystem))]
|
2025-02-09 17:18:24 +03:00
|
|
|
public sealed partial class CP14DemiplaneTimedDestructionComponent : Component
|
|
|
|
|
{
|
|
|
|
|
[DataField]
|
2025-05-05 15:19:44 +03:00
|
|
|
public TimeSpan TimeToDestruction = TimeSpan.FromSeconds(130f);
|
2025-02-09 17:18:24 +03:00
|
|
|
|
|
|
|
|
[DataField, AutoPausedField]
|
|
|
|
|
public TimeSpan EndTime = TimeSpan.Zero;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Countdown audio stream.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField, AutoNetworkedField]
|
|
|
|
|
public EntityUid? Stream = null;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sound that plays when the demiplane start to collapse.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[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 SoundPathSpecifier? SelectedSong;
|
|
|
|
|
}
|