using Content.Server.Power.Components; using Content.Server.Power.EntitySystems; using Content.Shared.Audio; namespace Content.Server.Audio; public sealed class AmbientSoundSystem : SharedAmbientSoundSystem { public override void Initialize() { base.Initialize(); SubscribeLocalEvent(HandlePowerChange); SubscribeLocalEvent(HandlePowerSupply); } private void HandlePowerSupply(EntityUid uid, AmbientOnPoweredComponent component, ref PowerNetBatterySupplyEvent args) { SetAmbience(uid, args.Supply); } private void HandlePowerChange(EntityUid uid, AmbientOnPoweredComponent component, ref PowerChangedEvent args) { SetAmbience(uid, args.Powered); } }