using Content.Server.Chemistry.EntitySystems;
using Content.Shared.Chemistry.Components;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.Chemistry.Components;
///
/// Passively increases a solution's quantity of a reagent.
///
[RegisterComponent]
[Access(typeof(SolutionRegenerationSystem))]
public sealed partial class SolutionRegenerationComponent : Component
{
///
/// The name of the solution to add to.
///
[DataField("solution", required: true), ViewVariables(VVAccess.ReadWrite)]
public string SolutionName = string.Empty;
///
/// The solution to add reagents to.
///
[DataField("solutionRef")]
public Entity? Solution = null;
///
/// The reagent(s) to be regenerated in the solution.
///
[DataField("generated", required: true), ViewVariables(VVAccess.ReadWrite)]
public Solution Generated = default!;
///
/// How long it takes to regenerate once.
///
[DataField("duration"), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan Duration = TimeSpan.FromSeconds(1);
///
/// The time when the next regeneration will occur.
///
[DataField("nextChargeTime", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan NextRegenTime = TimeSpan.FromSeconds(0);
}