Raise power events by ref and not broadcast (#11923)
Also some other minor stuff.
This commit is contained in:
@@ -181,7 +181,7 @@ public sealed class SurveillanceCameraMonitorSystem : EntitySystem
|
||||
TrySwitchCameraByAddress(uid, message.Address, component);
|
||||
}
|
||||
|
||||
private void OnPowerChanged(EntityUid uid, SurveillanceCameraMonitorComponent component, PowerChangedEvent args)
|
||||
private void OnPowerChanged(EntityUid uid, SurveillanceCameraMonitorComponent component, ref PowerChangedEvent args)
|
||||
{
|
||||
if (!args.Powered)
|
||||
{
|
||||
|
||||
@@ -86,7 +86,7 @@ public sealed class SurveillanceCameraRouterSystem : EntitySystem
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPowerChanged(EntityUid uid, SurveillanceCameraRouterComponent component, PowerChangedEvent args)
|
||||
private void OnPowerChanged(EntityUid uid, SurveillanceCameraRouterComponent component, ref PowerChangedEvent args)
|
||||
{
|
||||
component.MonitorRoutes.Clear();
|
||||
component.Active = args.Powered;
|
||||
|
||||
@@ -143,7 +143,7 @@ public sealed class SurveillanceCameraSystem : EntitySystem
|
||||
|
||||
|
||||
|
||||
private void OnPowerChanged(EntityUid camera, SurveillanceCameraComponent component, PowerChangedEvent args)
|
||||
private void OnPowerChanged(EntityUid camera, SurveillanceCameraComponent component, ref PowerChangedEvent args)
|
||||
{
|
||||
SetActive(camera, args.Powered, component);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user