Files
OldThink/Content.Server/Solar/Components/SolarPanelComponent.cs

29 lines
838 B
C#
Raw Normal View History

2021-06-09 22:19:39 +02:00
using Content.Server.Solar.EntitySystems;
2020-05-21 20:08:03 +01:00
2021-06-09 22:19:39 +02:00
namespace Content.Server.Solar.Components
2020-05-21 20:08:03 +01:00
{
/// <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
2020-05-21 20:08:03 +01:00
{
/// <summary>
/// Maximum supply output by this panel (coverage = 1)
/// </summary>
[DataField("maxSupply")]
public int MaxSupply = 750;
2020-05-21 20:08:03 +01:00
/// <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;
2020-05-21 20:08:03 +01:00
}
}