* cleanup * fix fixtures * this belongs into the next PR * review * misc --------- Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
|
|
|
namespace Content.Shared.Power.Components;
|
|
|
|
/// <summary>
|
|
/// Self-recharging battery.
|
|
/// To be used in combination with <see cref="BatteryComponent"/>.
|
|
/// </summary>
|
|
[RegisterComponent, AutoGenerateComponentPause]
|
|
public sealed partial class BatterySelfRechargerComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Is the component currently enabled?
|
|
/// </summary>
|
|
[DataField]
|
|
public bool AutoRecharge = true;
|
|
|
|
/// <summary>
|
|
/// At what rate does the entity automatically recharge?
|
|
/// </summary>
|
|
[DataField]
|
|
public float AutoRechargeRate;
|
|
|
|
/// <summary>
|
|
/// How long should the entity stop automatically recharging if charge is used?
|
|
/// </summary>
|
|
[DataField]
|
|
public TimeSpan AutoRechargePauseTime = TimeSpan.FromSeconds(0);
|
|
|
|
/// <summary>
|
|
/// Do not auto recharge if this timestamp has yet to happen, set for the auto recharge pause system.
|
|
/// </summary>
|
|
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
|
|
[AutoPausedField]
|
|
public TimeSpan NextAutoRecharge = TimeSpan.FromSeconds(0);
|
|
}
|