using Content.Server.Singularity.EntitySystems;
using Content.Shared.Atmos;
namespace Content.Server.Singularity.Components;
///
/// Generates electricity from radiation.
///
[RegisterComponent]
[Access(typeof(RadiationCollectorSystem))]
public sealed partial class RadiationCollectorComponent : Component
{
///
/// Power output (in Watts) per unit of radiation collected.
///
[DataField]
[ViewVariables(VVAccess.ReadWrite)]
public float ChargeModifier = 30000f;
///
/// Number of power ticks that the power supply can remain active for. This is needed since
/// power and radiation don't update at the same tickrate, and since radiation does not provide
/// an update when radiation is removed. When this goes to zero, zero out the power supplier
/// to model the radiation source going away.
///
[DataField]
[ViewVariables(VVAccess.ReadWrite)]
public int PowerTicksLeft = 0;
///
/// Is the machine enabled.
///
[DataField]
[ViewVariables]
public bool Enabled;
///
/// List of gases that will react to the radiation passing through the collector
///
[DataField]
[ViewVariables(VVAccess.ReadWrite)]
public List? RadiationReactiveGases;
}
///
/// Describes how a gas reacts to the collected radiation
///
[DataDefinition]
public sealed partial class RadiationReactiveGas
{
///
/// The reactant gas
///
[DataField(required: true)]
public Gas ReactantPrototype;
///
/// Multipier for the amount of power produced by the radiation collector when using this gas
///
[DataField]
public float PowerGenerationEfficiency = 1f;
///
/// Controls the rate (molar percentage per rad) at which the reactant breaks down when exposed to radiation
///
/// ///
/// Set to zero if the reactant does not deplete
///
[DataField]
public float ReactantBreakdownRate = 1f;
///
/// A byproduct gas that is generated when the reactant breaks down
///
///
/// Leave null if the reactant no byproduct gas is to be formed
///
[DataField]
public Gas? Byproduct;
///
/// The molar ratio of the byproduct gas generated from the reactant gas
///
[DataField]
public float MolarRatio = 1f;
}