Fix AtmosDeviceSystem debug assert Heisenbug (#29752)
Fix AtmosDeviceSystem debug assertion Heisenbug
This commit is contained in:
@@ -132,10 +132,19 @@ namespace Content.Server.Atmos.Piping.EntitySystems
|
||||
var ev = new AtmosDeviceUpdateEvent(_atmosphereSystem.AtmosTime, null, null);
|
||||
foreach (var device in _joinedDevices)
|
||||
{
|
||||
DebugTools.Assert(!HasComp<GridAtmosphereComponent>(Transform(device).GridUid));
|
||||
var deviceGrid = Transform(device).GridUid;
|
||||
if (HasComp<GridAtmosphereComponent>(deviceGrid))
|
||||
{
|
||||
RejoinAtmosphere(device);
|
||||
}
|
||||
RaiseLocalEvent(device, ref ev);
|
||||
device.Comp.LastProcess = time;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsJoinedOffGrid(Entity<AtmosDeviceComponent> device)
|
||||
{
|
||||
return _joinedDevices.Contains(device);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user