2024-08-07 04:19:50 +00:00
|
|
|
using Content.Shared.Chemistry.Components;
|
|
|
|
|
using Content.Shared.Chemistry.Reagent;
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
2024-10-31 18:00:47 +03:00
|
|
|
using Robust.Shared.Prototypes;
|
2024-08-07 04:19:50 +00:00
|
|
|
|
|
|
|
|
namespace Content.Server._White.AutoRegenReagent
|
|
|
|
|
{
|
|
|
|
|
[RegisterComponent]
|
|
|
|
|
public sealed partial class AutoRegenReagentComponent : Component
|
|
|
|
|
{
|
|
|
|
|
[DataField("solution", required: true)]
|
|
|
|
|
public string? SolutionName = null; // we'll fail during tests otherwise
|
|
|
|
|
|
|
|
|
|
[DataField("reagents", required: true)]
|
2024-10-31 18:00:47 +03:00
|
|
|
public List<ProtoId<ReagentPrototype>> Reagents = default!;
|
2024-08-07 04:19:50 +00:00
|
|
|
|
|
|
|
|
[DataField]
|
2024-10-31 18:00:47 +03:00
|
|
|
public ProtoId<ReagentPrototype> CurrentReagent = default!;
|
2024-08-07 04:19:50 +00:00
|
|
|
|
|
|
|
|
[DataField]
|
|
|
|
|
public int CurrentIndex = 0;
|
|
|
|
|
|
|
|
|
|
public Entity<SolutionComponent>? Solution = default!;
|
|
|
|
|
|
|
|
|
|
[DataField("interval")]
|
|
|
|
|
public TimeSpan Interval = TimeSpan.FromSeconds(10);
|
|
|
|
|
|
|
|
|
|
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
|
|
|
|
|
public TimeSpan NextUpdate;
|
|
|
|
|
|
|
|
|
|
[DataField("unitsPerInterval")]
|
|
|
|
|
public float UnitsPerInterval = 1f;
|
|
|
|
|
}
|
|
|
|
|
}
|