Reduce atmos system resolves (#6465)

This commit is contained in:
Leon Friedrich
2022-02-05 23:57:26 +13:00
committed by GitHub
parent df1162e9f6
commit 32ada7de7a
9 changed files with 20 additions and 16 deletions

View File

@@ -1,4 +1,5 @@
using System;
using Content.Server.Atmos.EntitySystems;
using Content.Server.Atmos.Piping.Binary.Components;
using Content.Server.Atmos.Piping.Components;
using Content.Server.NodeContainer;
@@ -6,12 +7,15 @@ using Content.Server.NodeContainer.Nodes;
using Content.Shared.Atmos;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
namespace Content.Server.Atmos.Piping.Binary.EntitySystems
{
[UsedImplicitly]
public class GasPassiveGateSystem : EntitySystem
{
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
public override void Initialize()
{
base.Initialize();
@@ -46,7 +50,7 @@ namespace Content.Server.Atmos.Piping.Binary.EntitySystems
var transferMoles = pressureDelta * outlet.Air.Volume / (inlet.Air.Temperature * Atmospherics.R);
// Actually transfer the gas.
outlet.AssumeAir(inlet.Air.Remove(transferMoles));
_atmosphereSystem.Merge(outlet.Air, inlet.Air.Remove(transferMoles));
}
}
}