mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* burge * bruegr * YAML * two misc fixes * snoutta here * add tests --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> Co-authored-by: Janet Blackquill <uhhadd@gmail.com>
42 lines
1.3 KiB
C#
42 lines
1.3 KiB
C#
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;
|
|
|
|
/// <summary>
|
|
/// Passively decreases a solution's quantity of reagent(s).
|
|
/// </summary>
|
|
[RegisterComponent, AutoGenerateComponentPause]
|
|
[NetworkedComponent, AutoGenerateComponentState]
|
|
[Access(typeof(SolutionPurgeSystem))]
|
|
public sealed partial class SolutionPurgeComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The reagent(s) to be ignored when purging the solution
|
|
/// </summary>
|
|
[DataField]
|
|
public List<ProtoId<ReagentPrototype>> Preserve = [];
|
|
|
|
/// <summary>
|
|
/// Amount of reagent(s) that are purged
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public FixedPoint2 Quantity;
|
|
|
|
/// <summary>
|
|
/// How long it takes to purge once.
|
|
/// </summary>
|
|
[DataField]
|
|
public TimeSpan Duration = TimeSpan.FromSeconds(1);
|
|
|
|
/// <summary>
|
|
/// The time when the next purge will occur.
|
|
/// </summary>
|
|
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
|
|
[AutoPausedField, AutoNetworkedField]
|
|
public TimeSpan NextPurgeTime;
|
|
}
|