using Content.Shared.Atmos; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Server.Power.Generator; /// /// This is used for providing gas power to machinery. /// [RegisterComponent, Access(typeof(GasPowerReceiverSystem))] public sealed partial class GasPowerReceiverComponent : Component { /// /// Past this temperature we assume we're in reaction mass mode and not magic mode. /// [DataField("maxTemperature"), ViewVariables(VVAccess.ReadWrite)] public float MaxTemperature = 1000.0f; /// /// The gas that fuels this generator /// [DataField("targetGas", required: true), ViewVariables(VVAccess.ReadWrite)] public Gas TargetGas; /// /// The amount of gas consumed for operation in magic mode. /// [DataField("molesConsumedSec"), ViewVariables(VVAccess.ReadWrite)] public float MolesConsumedSec = 1.55975875833f / 4; /// /// The amount of kPA "consumed" for operation in pressure mode. /// [DataField("pressureConsumedSec"), ViewVariables(VVAccess.ReadWrite)] public float PressureConsumedSec = 100f; /// /// Whether the consumed gas should then be ejected directly into the atmosphere. /// [DataField("offVentGas"), ViewVariables(VVAccess.ReadWrite)] public bool OffVentGas; [DataField("lastProcess", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)] public TimeSpan LastProcess = TimeSpan.Zero; [DataField("powered"), ViewVariables(VVAccess.ReadWrite)] public bool Powered = true; }