using Robust.Shared.Serialization;
using Robust.Shared.GameStates;
namespace Content.Shared.Atmos.Components;
[NetworkedComponent]
[AutoGenerateComponentState]
[RegisterComponent]
public sealed partial class GasMinerComponent : Component
{
///
/// Operational state of the miner.
///
[AutoNetworkedField]
[ViewVariables(VVAccess.ReadOnly)]
public GasMinerState MinerState = GasMinerState.Disabled;
///
/// If the number of moles in the external environment exceeds this number, no gas will be mined.
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField]
public float MaxExternalAmount = float.PositiveInfinity;
///
/// If the pressure (in kPA) of the external environment exceeds this number, no gas will be mined.
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField]
public float MaxExternalPressure = Atmospherics.GasMinerDefaultMaxExternalPressure;
///
/// Gas to spawn.
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField(required: true)]
public Gas SpawnGas;
///
/// Temperature in Kelvin.
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField]
public float SpawnTemperature = Atmospherics.T20C;
///
/// Number of moles created per second when the miner is working.
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField]
public float SpawnAmount = Atmospherics.MolesCellStandard * 20f;
}
[Serializable, NetSerializable]
public enum GasMinerState : byte
{
Disabled,
Idle,
Working,
}