Fixed Bug: #0251 - Max Power De-Synced from network components.

This commit is contained in:
AlgorithmX2 2014-03-29 04:03:35 -05:00
parent 34b81439f4
commit 740e9e27bf

View file

@ -241,10 +241,14 @@ public class EnergyGridCache implements IEnergyGrid
double max = ps.getAEMaxPower();
double current = ps.getAECurrentPower();
if ( current > 0 && ps.getPowerFlow() != AccessRestriction.WRITE )
if ( ps.getPowerFlow() != AccessRestriction.WRITE )
{
globalMaxPower += ps.getAEMaxPower();
globalAvailablePower += ((IAEPowerStorage) machine).getAECurrentPower();
}
if ( current > 0 && ps.getPowerFlow() != AccessRestriction.WRITE )
{
globalAvailablePower += current;
providers.add( ps );
}