Fixed Bug: #0251 - Max Power De-Synced from network components.
This commit is contained in:
Vendored
+6
-2
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user