Gas Tanks no longer use NodeContainer, Gas Canisters no longer use passive gates.

This commit is contained in:
Vera Aguilera Puerto
2021-06-23 12:02:28 +02:00
parent 263c9ef974
commit 34e457b854
7 changed files with 93 additions and 149 deletions

View File

@@ -0,0 +1,32 @@
using Content.Server.Atmos.Components;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.Atmos.EntitySystems
{
[UsedImplicitly]
public class GasTankSystem : EntitySystem
{
private const float TimerDelay = 0.5f;
private float _timer = 0f;
public override void Update(float frameTime)
{
base.Update(frameTime);
_timer += frameTime;
if (_timer < TimerDelay) return;
_timer -= TimerDelay;
var atmosphereSystem = Get<AtmosphereSystem>();
foreach (var gasTank in EntityManager.ComponentManager.EntityQuery<GasTankComponent>())
{
atmosphereSystem.React(gasTank.Air, gasTank);
gasTank.CheckStatus();
gasTank.UpdateUserInterface();
}
}
}
}