Some work on the mess that is this power code.

Jesus.

Tons of fixes, refactors and other things.
The powernet's code is still awful though.
This commit is contained in:
Pieter-Jan Briers
2018-05-27 16:44:50 +02:00
parent f1ec10e3e1
commit 147aad5064
24 changed files with 444 additions and 172 deletions

View File

@@ -33,7 +33,7 @@ namespace Content.Server.GameObjects.Components.Power
/// Rate at which energy will be distributed to the powernet if needed
/// </summary>
public float DistributionRate { get; private set; } = 1000;
private bool _chargepowernet = false;
/// <summary>
@@ -156,7 +156,7 @@ namespace Content.Server.GameObjects.Components.Power
/// </summary>
public void ChargePowerTick()
{
Charge = Math.Max(Charge + ChargeRate, Capacity);
Charge = Math.Min(Charge + ChargeRate, Capacity);
}
/// <summary>