Fixed Bug: #0251 - Max Power De-Synced from network components.
This commit is contained in:
parent
34b81439f4
commit
740e9e27bf
1 changed files with 6 additions and 2 deletions
8
me/cache/EnergyGridCache.java
vendored
8
me/cache/EnergyGridCache.java
vendored
|
@ -241,10 +241,14 @@ public class EnergyGridCache implements IEnergyGrid
|
||||||
double max = ps.getAEMaxPower();
|
double max = ps.getAEMaxPower();
|
||||||
double current = ps.getAECurrentPower();
|
double current = ps.getAECurrentPower();
|
||||||
|
|
||||||
if ( current > 0 && ps.getPowerFlow() != AccessRestriction.WRITE )
|
if ( ps.getPowerFlow() != AccessRestriction.WRITE )
|
||||||
{
|
{
|
||||||
globalMaxPower += ps.getAEMaxPower();
|
globalMaxPower += ps.getAEMaxPower();
|
||||||
globalAvailablePower += ((IAEPowerStorage) machine).getAECurrentPower();
|
}
|
||||||
|
|
||||||
|
if ( current > 0 && ps.getPowerFlow() != AccessRestriction.WRITE )
|
||||||
|
{
|
||||||
|
globalAvailablePower += current;
|
||||||
providers.add( ps );
|
providers.add( ps );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue