Atmos device performance improvements (#26493)
* Atmos device performance improvements * AtmosDirection perf improvements * Fix errors * Add GasTileOverlayComponent arguments * Make excite no longer invalidate a tile
This commit is contained in:
@@ -26,12 +26,8 @@ public sealed class GasPowerReceiverSystem : EntitySystem
|
||||
{
|
||||
var timeDelta = args.dt;
|
||||
|
||||
if (!HasComp<AtmosDeviceComponent>(uid)
|
||||
|| !TryComp<NodeContainerComponent>(uid, out var nodeContainer)
|
||||
|| !_nodeContainer.TryGetNode<PipeNode>(nodeContainer, "pipe", out var pipe))
|
||||
{
|
||||
if (!_nodeContainer.TryGetNode(uid, "pipe", out PipeNode? pipe))
|
||||
return;
|
||||
}
|
||||
|
||||
// if we're below the max temperature, then we are simply consuming our target gas
|
||||
if (pipe.Air.Temperature <= component.MaxTemperature)
|
||||
@@ -57,7 +53,7 @@ public sealed class GasPowerReceiverSystem : EntitySystem
|
||||
if (component.OffVentGas)
|
||||
{
|
||||
// eject the gas into the atmosphere
|
||||
var mix = _atmosphereSystem.GetContainingMixture(uid, false, true);
|
||||
var mix = _atmosphereSystem.GetContainingMixture(uid, args.Grid, args.Map, false, true);
|
||||
if (mix is not null)
|
||||
_atmosphereSystem.Merge(res, mix);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user