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