using Content.Shared.Atmos.Piping.Binary.Components; using Content.Shared.Containers.ItemSlots; using Content.Shared.Guidebook; using Robust.Shared.Audio; using Robust.Shared.GameStates; namespace Content.Shared.Atmos.Piping.Unary.Components; [RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)] public sealed partial class GasCanisterComponent : Component, IGasMixtureHolder { [DataField("port")] public string PortName { get; set; } = "port"; /// /// Container name for the gas tank holder. /// [DataField("container")] public string ContainerName { get; set; } = "tank_slot"; [DataField] public ItemSlot GasTankSlot = new(); [DataField("gasMixture")] public GasMixture Air { get; set; } = new(); /// /// Last recorded pressure, for appearance-updating purposes. /// public float LastPressure = 0f; /// /// Minimum release pressure possible for the release valve. /// [DataField, AutoNetworkedField] public float MinReleasePressure = Atmospherics.OneAtmosphere / 10; /// /// Maximum release pressure possible for the release valve. /// [DataField, AutoNetworkedField] public float MaxReleasePressure = Atmospherics.OneAtmosphere * 10; /// /// Valve release pressure. /// [DataField, AutoNetworkedField] public float ReleasePressure = Atmospherics.OneAtmosphere; /// /// Whether the release valve is open on the canister. /// [DataField, AutoNetworkedField] public bool ReleaseValve = false; [GuidebookData] public float Volume => Air.Volume; }