using Content.Server.Charges.Systems; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Server.Charges.Components; /// /// Something with limited charges that can be recharged automatically. /// Requires LimitedChargesComponent to function. /// [RegisterComponent] [Access(typeof(ChargesSystem))] public sealed class AutoRechargeComponent : Component { /// /// The time it takes to regain a single charge /// [DataField("rechargeDuration"), ViewVariables(VVAccess.ReadWrite)] public TimeSpan RechargeDuration = TimeSpan.FromSeconds(90); /// /// The time when the next charge will be added /// [DataField("nextChargeTime", customTypeSerializer: typeof(TimeOffsetSerializer))] public TimeSpan NextChargeTime = TimeSpan.MaxValue; }