SolarPanelComponent.cs 894 B

123456789101112131415161718192021222324252627282930
  1. using Content.Server.Solar.EntitySystems;
  2. using Content.Shared.Guidebook;
  3. namespace Content.Server.Solar.Components
  4. {
  5. /// <summary>
  6. /// This is a solar panel.
  7. /// It generates power from the sun based on coverage.
  8. /// </summary>
  9. [RegisterComponent]
  10. [Access(typeof(PowerSolarSystem))]
  11. public sealed partial class SolarPanelComponent : Component
  12. {
  13. /// <summary>
  14. /// Maximum supply output by this panel (coverage = 1)
  15. /// </summary>
  16. [DataField("maxSupply")]
  17. [GuidebookData]
  18. public int MaxSupply = 750;
  19. /// <summary>
  20. /// Current coverage of this panel (from 0 to 1).
  21. /// This is updated by <see cref='PowerSolarSystem'/>.
  22. /// DO NOT WRITE WITHOUT CALLING UpdateSupply()!
  23. /// </summary>
  24. [ViewVariables]
  25. public float Coverage { get; set; } = 0;
  26. }
  27. }