Files
tbd-station-14/Content.Shared/Atmos/EntitySystems/SharedAtmosphereSystem.cs
thetuerk bb3fa43f1f Predict LungSystem (#40729)
* Initial edits of files
Untested yet. I would like to make sure all is accounted for before moving the files.

* trying my best

* Revert "trying my best"

This reverts commit 9aeece466df0169adec97e3947b061b54fd9b388.

* Revert "Initial edits of files"

This reverts commit 45c6e2343844b5fcafadbf2e5115fb2f241086a1.

* an actual meal

* Added networking to LungComponent.cs

* removed duplicate using

* moving GasRagents to SharedAtmosphereSystem.cs
2025-10-09 10:26:21 +00:00

42 lines
1.4 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;
public string?[] GasReagents = new string[Atmospherics.TotalNumberOfGases];
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());
GasReagents[i] = GasPrototypes[i].Reagent;
}
}
public GasPrototype GetGas(int gasId) => GasPrototypes[gasId];
public GasPrototype GetGas(Gas gasId) => GasPrototypes[(int) gasId];
public IEnumerable<GasPrototype> Gases => GasPrototypes;
}
}