Ambient music fixes (#17685)
This commit is contained in:
@@ -2,25 +2,24 @@ using Content.Server.Power.Components;
|
||||
using Content.Server.Power.EntitySystems;
|
||||
using Content.Shared.Audio;
|
||||
|
||||
namespace Content.Server.Audio
|
||||
namespace Content.Server.Audio;
|
||||
|
||||
public sealed class AmbientSoundSystem : SharedAmbientSoundSystem
|
||||
{
|
||||
public sealed class AmbientSoundSystem : SharedAmbientSoundSystem
|
||||
public override void Initialize()
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<AmbientOnPoweredComponent, PowerChangedEvent>(HandlePowerChange);
|
||||
SubscribeLocalEvent<AmbientOnPoweredComponent, PowerNetBatterySupplyEvent>(HandlePowerSupply);
|
||||
}
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<AmbientOnPoweredComponent, PowerChangedEvent>(HandlePowerChange);
|
||||
SubscribeLocalEvent<AmbientOnPoweredComponent, PowerNetBatterySupplyEvent>(HandlePowerSupply);
|
||||
}
|
||||
|
||||
private void HandlePowerSupply(EntityUid uid, AmbientOnPoweredComponent component, ref PowerNetBatterySupplyEvent args)
|
||||
{
|
||||
SetAmbience(uid, args.Supply);
|
||||
}
|
||||
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);
|
||||
}
|
||||
private void HandlePowerChange(EntityUid uid, AmbientOnPoweredComponent component, ref PowerChangedEvent args)
|
||||
{
|
||||
SetAmbience(uid, args.Powered);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user