6
StarHorizon_Public/Content.Server/_NF/Solar/Components/SolarPoweredGridComponent.cs
2026-01-24 12:49:55 +03:00

49 lines
1.5 KiB
C#

namespace Content.Server._NF.Solar.Components;
/// <summary>
/// Represents a grid that's outputting solar power.
/// Stores tracking information, power generation stats, and bookkeeping info for solar power.
/// </summary>
[RegisterComponent]
public sealed partial class SolarPoweredGridComponent : Component
{
/// <summary>
/// The angle that panels on the grid should rotate towards.
/// </summary>
[DataField]
public Angle TargetPanelRotation = Angle.Zero;
/// <summary>
/// The angle that the target rotation rotates in a second.
/// </summary>
[DataField]
public Angle TargetPanelVelocity = Angle.Zero;
/// <summary>
/// The total solar power, in watts, being generated by this grid.
/// </summary>
[DataField]
public float TotalPanelPower = 0;
/// <summary>
/// The last tick that the solar power generation info was changed on this grid.
/// Used to cull power generation info from grids that are no longer generating solar power.
/// </summary>
[DataField]
public uint LastUpdatedTick = 0;
/// <summary>
/// If true, will initialize to the angle and velocity of the sun.
/// Useful to keep POIs running where players might not touch the solars.
/// </summary>
[DataField]
public bool TrackOnInit;
/// <summary>
/// If true, this component will not be culled.
/// Again, useful for POIs where tracking is expected.
/// </summary>
[DataField]
public bool DoNotCull;
}