using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Chemistry.Components;
///
/// Passively decreases a solution's quantity of reagent(s).
///
[RegisterComponent, AutoGenerateComponentPause]
[NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SolutionPurgeSystem))]
public sealed partial class SolutionPurgeComponent : Component
{
///
/// The name of the solution to detract from.
///
[DataField(required: true)]
public string Solution = string.Empty;
///
/// The reagent(s) to be ignored when purging the solution
///
[DataField]
public List> Preserve = [];
///
/// Amount of reagent(s) that are purged
///
[DataField(required: true)]
public FixedPoint2 Quantity;
///
/// How long it takes to purge once.
///
[DataField]
public TimeSpan Duration = TimeSpan.FromSeconds(1);
///
/// The time when the next purge will occur.
///
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
[AutoPausedField, AutoNetworkedField]
public TimeSpan NextPurgeTime;
}