Convert atmos device events to ref events (#22843)
This commit is contained in:
@@ -25,7 +25,7 @@ public sealed class AirFilterSystem : EntitySystem
|
||||
SubscribeLocalEvent<AirFilterComponent, AtmosDeviceUpdateEvent>(OnFilterUpdate);
|
||||
}
|
||||
|
||||
private void OnIntakeUpdate(EntityUid uid, AirIntakeComponent intake, AtmosDeviceUpdateEvent args)
|
||||
private void OnIntakeUpdate(EntityUid uid, AirIntakeComponent intake, ref AtmosDeviceUpdateEvent args)
|
||||
{
|
||||
if (!GetAir(uid, out var air))
|
||||
return;
|
||||
@@ -51,7 +51,7 @@ public sealed class AirFilterSystem : EntitySystem
|
||||
_atmosphere.Merge(air, environment.Remove(transferMoles));
|
||||
}
|
||||
|
||||
private void OnFilterUpdate(EntityUid uid, AirFilterComponent filter, AtmosDeviceUpdateEvent args)
|
||||
private void OnFilterUpdate(EntityUid uid, AirFilterComponent filter, ref AtmosDeviceUpdateEvent args)
|
||||
{
|
||||
if (!GetAir(uid, out var air))
|
||||
return;
|
||||
|
||||
@@ -406,9 +406,10 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
|
||||
var time = _gameTiming.CurTime;
|
||||
var number = 0;
|
||||
var ev = new AtmosDeviceUpdateEvent(RealAtmosTime());
|
||||
while (atmosphere.CurrentRunAtmosDevices.TryDequeue(out var device))
|
||||
{
|
||||
RaiseLocalEvent(device, new AtmosDeviceUpdateEvent(RealAtmosTime()));
|
||||
RaiseLocalEvent(device, ref ev);
|
||||
device.Comp.LastProcess = time;
|
||||
|
||||
if (number++ < LagCheckIterations)
|
||||
|
||||
@@ -43,7 +43,7 @@ public sealed class HeatExchangerSystem : EntitySystem
|
||||
tileLoss = val;
|
||||
}
|
||||
|
||||
private void OnAtmosUpdate(EntityUid uid, HeatExchangerComponent comp, AtmosDeviceUpdateEvent args)
|
||||
private void OnAtmosUpdate(EntityUid uid, HeatExchangerComponent comp, ref AtmosDeviceUpdateEvent args)
|
||||
{
|
||||
if (!TryComp(uid, out NodeContainerComponent? nodeContainer)
|
||||
|| !TryComp(uid, out AtmosDeviceComponent? device)
|
||||
|
||||
Reference in New Issue
Block a user