BatterySelfRechargerComponent.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. namespace Content.Server.Power.Components
  3. {
  4. /// <summary>
  5. /// Self-recharging battery.
  6. /// </summary>
  7. [RegisterComponent]
  8. public sealed partial class BatterySelfRechargerComponent : Component
  9. {
  10. /// <summary>
  11. /// Does the entity auto recharge?
  12. /// </summary>
  13. [DataField] public bool AutoRecharge;
  14. /// <summary>
  15. /// At what rate does the entity automatically recharge?
  16. /// </summary>
  17. [DataField] public float AutoRechargeRate;
  18. /// <summary>
  19. /// Should this entity stop automatically recharging if a charge is used?
  20. /// </summary>
  21. [DataField] public bool AutoRechargePause = false;
  22. /// <summary>
  23. /// How long should the entity stop automatically recharging if a charge is used?
  24. /// </summary>
  25. [DataField] public float AutoRechargePauseTime = 0f;
  26. /// <summary>
  27. /// Do not auto recharge if this timestamp has yet to happen, set for the auto recharge pause system.
  28. /// </summary>
  29. [DataField] public TimeSpan NextAutoRecharge = TimeSpan.FromSeconds(0f);
  30. }
  31. }