2024-12-11 17:21:04 +01:00
|
|
|
using System;
|
|
|
|
|
|
2021-11-18 19:02:17 +00:00
|
|
|
namespace Content.Server.Power.Components
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Self-recharging battery.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class BatterySelfRechargerComponent : Component
|
2021-11-18 19:02:17 +00:00
|
|
|
{
|
2024-12-11 17:21:04 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Does the entity auto recharge?
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField] public bool AutoRecharge;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// At what rate does the entity automatically recharge?
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField] public float AutoRechargeRate;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Should this entity stop automatically recharging if a charge is used?
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField] public bool AutoRechargePause = false;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How long should the entity stop automatically recharging if a charge is used?
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField] public float AutoRechargePauseTime = 0f;
|
2021-11-18 19:02:17 +00:00
|
|
|
|
2024-12-11 17:21:04 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Do not auto recharge if this timestamp has yet to happen, set for the auto recharge pause system.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField] public TimeSpan NextAutoRecharge = TimeSpan.FromSeconds(0f);
|
2021-11-18 19:02:17 +00:00
|
|
|
}
|
|
|
|
|
}
|