using Robust.Shared.Audio.Systems;
namespace Content.Shared.Audio.Jukebox;
public abstract class SharedJukeboxSystem : EntitySystem
{
[Dependency] protected readonly SharedAudioSystem Audio = default!;
///
/// Returns whether or not the given jukebox is currently playing a song.
///
public bool IsPlaying(Entity entity)
{
if (!Resolve(entity, ref entity.Comp))
return false;
return entity.Comp.AudioStream is { } audio && Audio.IsPlaying(audio);
}
}