CatStation/Content.Shared/Audio/Jukebox/SharedJukeboxSystem.cs
Pieter-Jan Briers 5168b5f3d4
IoC source gen compatibility (#43863)
* IoC source gen compatibility

Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter.

* Missed a spot
2026-05-09 03:29:58 +00:00

19 lines
550 B
C#

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