Solar panels occlusion and tracking (#961)

This commit is contained in:
20kdc
2020-06-02 12:32:18 +01:00
committed by GitHub
parent b4c928b709
commit a09131e817
8 changed files with 564 additions and 31 deletions

View File

@@ -60,6 +60,15 @@ namespace Content.Server.GameObjects.Components.Power
}
}
/// <summary>
/// The game time (<see cref='IGameTiming'/>) of the next coverage update.
/// This may have a random offset applied.
/// This is used to reduce solar panel updates and stagger them to prevent lagspikes.
/// This should only be updated by the PowerSolarSystem but is viewable for debugging.
/// </summary>
[ViewVariables]
public TimeSpan TimeOfNextCoverageUpdate = TimeSpan.MinValue;
private void UpdateSupply()
{
if (_powerGenerator != null)