This commit is contained in:
Kara D
2021-09-29 17:34:34 -07:00
parent 8365e8d52c
commit d3751ee706
2 changed files with 3 additions and 3 deletions

View File

@@ -16,7 +16,7 @@ namespace Content.Server.Audio
private void HandlePowerSupply(EntityUid uid, AmbientOnPoweredComponent component, PowerNetBatterySupplyEvent args) private void HandlePowerSupply(EntityUid uid, AmbientOnPoweredComponent component, PowerNetBatterySupplyEvent args)
{ {
if (!ComponentManager.TryGetComponent<AmbientSoundComponent>(uid, out var ambientSound)) return; if (!EntityManager.TryGetComponent<AmbientSoundComponent>(uid, out var ambientSound)) return;
if (ambientSound.Enabled == args.Supply) return; if (ambientSound.Enabled == args.Supply) return;
ambientSound.Enabled = args.Supply; ambientSound.Enabled = args.Supply;
ambientSound.Dirty(); ambientSound.Dirty();

View File

@@ -154,7 +154,7 @@ namespace Content.Server.Power.EntitySystems
// Setup for events. // Setup for events.
{ {
foreach (var powerNetBattery in ComponentManager.EntityQuery<PowerNetworkBatteryComponent>()) foreach (var powerNetBattery in EntityManager.EntityQuery<PowerNetworkBatteryComponent>())
{ {
_lastSupply[powerNetBattery] = powerNetBattery.CurrentSupply; _lastSupply[powerNetBattery] = powerNetBattery.CurrentSupply;
} }
@@ -218,7 +218,7 @@ namespace Content.Server.Power.EntitySystems
} }
} }
foreach (var powerNetBattery in ComponentManager.EntityQuery<PowerNetworkBatteryComponent>()) foreach (var powerNetBattery in EntityManager.EntityQuery<PowerNetworkBatteryComponent>())
{ {
if (!_lastSupply.TryGetValue(powerNetBattery, out var lastPowerSupply)) if (!_lastSupply.TryGetValue(powerNetBattery, out var lastPowerSupply))
{ {