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
{
///
/// How much joules will collector generate for each rad.
///
[DataField("chargeModifier")]
[ViewVariables(VVAccess.ReadWrite)]
public float ChargeModifier = 30000f;
///
/// Cooldown time between users interaction.
///
[DataField("cooldown")]
[ViewVariables(VVAccess.ReadWrite)]
public TimeSpan Cooldown = TimeSpan.FromSeconds(0.81f);
///
/// Was machine activated by user?
///
[ViewVariables(VVAccess.ReadOnly)]
public bool Enabled;
///
/// Timestamp when machine can be deactivated again.
///
public TimeSpan CoolDownEnd;
///
/// List of gases that will react to the radiation passing through the collector
///
[DataField("radiationReactiveGases")]
[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("reactantPrototype", required: true)]
public Gas Reactant = Gas.Plasma;
///
/// Multipier for the amount of power produced by the radiation collector when using this gas
///
[DataField("powerGenerationEfficiency")]
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("reactantBreakdownRate")]
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("byproductPrototype")]
public Gas? Byproduct = null;
///
/// The molar ratio of the byproduct gas generated from the reactant gas
///
[DataField("molarRatio")]
public float MolarRatio = 1f;
}