Power Event should fire when power becomes available, even if the networks idle cost is 0.
This commit is contained in:
Vendored
+11
-2
@@ -384,8 +384,17 @@ public class EnergyGridCache implements IEnergyGrid
|
|||||||
tickInjectionPerTick = 0;
|
tickInjectionPerTick = 0;
|
||||||
|
|
||||||
// power information.
|
// power information.
|
||||||
double drained = extractAEPower( getIdlePowerUsage(), Actionable.MODULATE, PowerMultiplier.CONFIG );
|
boolean currentlyHasPower = false;
|
||||||
boolean currentlyHasPower = drained >= drainPerTick - 0.001;
|
|
||||||
|
if ( drainPerTick > 0.0001 )
|
||||||
|
{
|
||||||
|
double drained = extractAEPower( getIdlePowerUsage(), Actionable.MODULATE, PowerMultiplier.CONFIG );
|
||||||
|
currentlyHasPower = drained >= drainPerTick - 0.001;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentlyHasPower = extractAEPower( 0.1, Actionable.SIMULATE, PowerMultiplier.CONFIG ) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
// ticks since change..
|
// ticks since change..
|
||||||
if ( currentlyHasPower == hasPower )
|
if ( currentlyHasPower == hasPower )
|
||||||
|
|||||||
Reference in New Issue
Block a user