Files
tbd-station-14/Content.Shared/Atmos/Piping/Unary/Components/GasCanisterComponent.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

59 lines
1.7 KiB
C#

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]
public sealed partial class GasCanisterComponent : Component, IGasMixtureHolder
{
[DataField("port")]
public string PortName { get; set; } = "port";
/// <summary>
/// Container name for the gas tank holder.
/// </summary>
[DataField("container")]
public string ContainerName { get; set; } = "tank_slot";
[DataField]
public ItemSlot GasTankSlot = new();
[DataField("gasMixture")]
public GasMixture Air { get; set; } = new();
/// <summary>
/// Last recorded pressure, for appearance-updating purposes.
/// </summary>
public float LastPressure = 0f;
/// <summary>
/// Minimum release pressure possible for the release valve.
/// </summary>
[DataField, AutoNetworkedField]
public float MinReleasePressure = Atmospherics.OneAtmosphere / 10;
/// <summary>
/// Maximum release pressure possible for the release valve.
/// </summary>
[DataField, AutoNetworkedField]
public float MaxReleasePressure = Atmospherics.OneAtmosphere * 10;
/// <summary>
/// Valve release pressure.
/// </summary>
[DataField, AutoNetworkedField]
public float ReleasePressure = Atmospherics.OneAtmosphere;
/// <summary>
/// Whether the release valve is open on the canister.
/// </summary>
[DataField, AutoNetworkedField]
public bool ReleaseValve = false;
[GuidebookData]
public float Volume => Air.Volume;
}