| 123456789101112131415161718192021222324252627282930 |
- using Content.Server.Solar.EntitySystems;
- using Content.Shared.Guidebook;
- namespace Content.Server.Solar.Components
- {
- /// <summary>
- /// This is a solar panel.
- /// It generates power from the sun based on coverage.
- /// </summary>
- [RegisterComponent]
- [Access(typeof(PowerSolarSystem))]
- public sealed partial class SolarPanelComponent : Component
- {
- /// <summary>
- /// Maximum supply output by this panel (coverage = 1)
- /// </summary>
- [DataField("maxSupply")]
- [GuidebookData]
- public int MaxSupply = 750;
- /// <summary>
- /// Current coverage of this panel (from 0 to 1).
- /// This is updated by <see cref='PowerSolarSystem'/>.
- /// DO NOT WRITE WITHOUT CALLING UpdateSupply()!
- /// </summary>
- [ViewVariables]
- public float Coverage { get; set; } = 0;
- }
- }
|