* Added Jukebox, along with music for jukebox * Fixed Jukebox meta.json copyright * Removed songs I couldn't find a license for. * Renamed files to solve check failures from spaces * Added missing attributions.yml * Fixed lack of description in Jukebox * Jukebox is now constructable. * Change Jukebox menu to FancyWindow * Moved Jukebox messages out of jukebox component * Removed Jukebox OnValueChanged. * JukeboxComp now uses AutoGenerateComponentState * Removed state code, since it's auto generated * Fixed various Jukebox code to match conventions. * Updated Standard.yml to match changed song list. * fixes * Jukebox workin * Fix * Polishing * Finalising * Revert * bad * jukey * Reviews * name * Update submodule to 218.2.0 --------- Co-authored-by: iNVERTED <alextjorgensen@gmail.com>
81 lines
1.9 KiB
C#
81 lines
1.9 KiB
C#
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
|
|
}
|