Files
tbd-station-14/Content.Shared/Atmos/EntitySystems/SharedAtmosphereSystem.cs
metalgearsloth bd69fc612a Predicted internals (#33800)
* Predicted gas pumps

I wanted to try out atmos and first thing I found.

* a

* Atmos device prediction

- Canisters
- Tanks
- Internals

AirMixes aren't predicted so nothing on that front but all the UIs should be a lot closer.

* Remove details range

* Gas tank prediction

* Even more sweeping changes

* Alerts

* rehg

* Popup fix

* Fix merge conflicts

* Fix

* Review
2025-05-02 18:22:29 +10:00

39 lines
1.2 KiB
C#

using Content.Shared.Atmos.Components;
using Content.Shared.Atmos.Prototypes;
using Content.Shared.Body.Components;
using Content.Shared.Body.Systems;
using Robust.Shared.Prototypes;
namespace Content.Shared.Atmos.EntitySystems
{
public abstract partial class SharedAtmosphereSystem : EntitySystem
{
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly SharedInternalsSystem _internals = default!;
private EntityQuery<InternalsComponent> _internalsQuery;
protected readonly GasPrototype[] GasPrototypes = new GasPrototype[Atmospherics.TotalNumberOfGases];
public override void Initialize()
{
base.Initialize();
_internalsQuery = GetEntityQuery<InternalsComponent>();
InitializeBreathTool();
for (var i = 0; i < Atmospherics.TotalNumberOfGases; i++)
{
GasPrototypes[i] = _prototypeManager.Index<GasPrototype>(i.ToString());
}
}
public GasPrototype GetGas(int gasId) => GasPrototypes[gasId];
public GasPrototype GetGas(Gas gasId) => GasPrototypes[(int) gasId];
public IEnumerable<GasPrototype> Gases => GasPrototypes;
}
}