Raise power events by ref and not broadcast (#11923)
Also some other minor stuff.
This commit is contained in:
@@ -195,7 +195,7 @@ public sealed class AirAlarmSystem : EntitySystem
|
||||
UpdateUI(uid, component);
|
||||
}
|
||||
|
||||
private void OnPowerChanged(EntityUid uid, AirAlarmComponent component, PowerChangedEvent args)
|
||||
private void OnPowerChanged(EntityUid uid, AirAlarmComponent component, ref PowerChangedEvent args)
|
||||
{
|
||||
if (args.Powered)
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ public sealed class AtmosAlarmableSystem : EntitySystem
|
||||
false);
|
||||
}
|
||||
|
||||
private void OnPowerChange(EntityUid uid, AtmosAlarmableComponent component, PowerChangedEvent args)
|
||||
private void OnPowerChange(EntityUid uid, AtmosAlarmableComponent component, ref PowerChangedEvent args)
|
||||
{
|
||||
if (!args.Powered)
|
||||
{
|
||||
|
||||
@@ -142,7 +142,7 @@ public sealed class AtmosMonitorSystem : EntitySystem
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPowerChangedEvent(EntityUid uid, AtmosMonitorComponent component, PowerChangedEvent args)
|
||||
private void OnPowerChangedEvent(EntityUid uid, AtmosMonitorComponent component, ref PowerChangedEvent args)
|
||||
{
|
||||
if (TryComp<AtmosDeviceComponent>(uid, out var atmosDeviceComponent))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user