markForUpdate();
}
}
else
{
IEnergyGrid eg;
try
{
eg = gridProxy.getEnergy();
IEnergySource src = this;
// Base 1, increase by 1 for each card
int speedFactor = 1 + upgrades.getInstalledUpgrades( Upgrades.SPEED );
int powerConsumption = 10 * speedFactor;
double powerThreshold = powerConsumption - 0.01;
double powerReq = extractAEPower( powerConsumption, Actionable.SIMULATE, PowerMultiplier.CONFIG );
if ( powerReq <= powerThreshold )
{
src = eg;
powerReq = eg.extractAEPower( powerConsumption, Actionable.SIMULATE, PowerMultiplier.CONFIG );
}
if ( powerReq > powerThreshold )
{
src.extractAEPower( powerConsumption, Actionable.MODULATE, PowerMultiplier.CONFIG );