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]
|
2022-06-07 15:26:28 +02:00
|
|
|
[Access(typeof(PowerSolarSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class SolarPanelComponent : Component
|
2020-05-21 20:08:03 +01:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Maximum supply output by this panel (coverage = 1)
|
|
|
|
|
/// </summary>
|
2021-11-26 09:17:21 +00:00
|
|
|
[DataField("maxSupply")]
|
2023-04-24 20:32:01 +01:00
|
|
|
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'/>.
|
2021-11-26 09:17:21 +00:00
|
|
|
/// DO NOT WRITE WITHOUT CALLING UpdateSupply()!
|
2020-06-02 12:32:18 +01:00
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables]
|
2021-11-26 09:17:21 +00:00
|
|
|
public float Coverage { get; set; } = 0;
|
2020-05-21 20:08:03 +01:00
|
|
|
}
|
|
|
|
|
}
|