Files
crystall-punk-14/Content.Shared/Audio/Jukebox/JukeboxComponent.cs

81 lines
1.9 KiB
C#
Raw Permalink Normal View History

using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
namespace Content.Shared.Audio.Jukebox;
[NetworkedComponent, RegisterComponent, AutoGenerateComponentState(true)]
[Access(typeof(SharedJukeboxSystem))]
public sealed partial class JukeboxComponent : Component
{
[DataField, AutoNetworkedField]
public ProtoId<JukeboxPrototype>? SelectedSongId;
[DataField, AutoNetworkedField]
public EntityUid? AudioStream;
/// <summary>
/// RSI state for the jukebox being on.
/// </summary>
[DataField]
public string? OnState;
/// <summary>
/// RSI state for the jukebox being on.
/// </summary>
[DataField]
public string? OffState;
/// <summary>
/// RSI state for the jukebox track being selected.
/// </summary>
[DataField]
public string? SelectState;
[ViewVariables]
public bool Selecting;
[ViewVariables]
public float SelectAccumulator;
}
[Serializable, NetSerializable]
public sealed class JukeboxPlayingMessage : BoundUserInterfaceMessage;
[Serializable, NetSerializable]
public sealed class JukeboxPauseMessage : BoundUserInterfaceMessage;
[Serializable, NetSerializable]
public sealed class JukeboxStopMessage : BoundUserInterfaceMessage;
[Serializable, NetSerializable]
public sealed class JukeboxSelectedMessage(ProtoId<JukeboxPrototype> songId) : BoundUserInterfaceMessage
{
public ProtoId<JukeboxPrototype> SongId { get; } = songId;
}
[Serializable, NetSerializable]
public sealed class JukeboxSetTimeMessage(float songTime) : BoundUserInterfaceMessage
{
public float SongTime { get; } = songTime;
}
[Serializable, NetSerializable]
public enum JukeboxVisuals : byte
{
VisualState
}
[Serializable, NetSerializable]
public enum JukeboxVisualState : byte
{
On,
Off,
Select,
}
public enum JukeboxVisualLayers : byte
{
Base
}