Fix secondary energy consumption with speed upgrades.

Might make them less efficient with speed upgrades and add a secondary
energy upgrade that mitigates this, like the current energy upgrade.
This commit is contained in:
Ben Spiers committed 2014-08-27 02:17:45 +01:00
1 parent 6714034771
commit 40c06f1004
3 files changed
+14 -3

No files matched your search

@@ -96,7 +96,7 @@ public abstract class TileEntityAdvancedElectricMachine extends TileEntityBasicM
boolean changed = false;
if(canOperate() && MekanismUtils.canFunction(this) && getEnergy() >= MekanismUtils.getEnergyPerTick(this, ENERGY_PER_TICK) && gasTank.getStored() >= SECONDARY_ENERGY_PER_TICK)
if(canOperate() && MekanismUtils.canFunction(this) && getEnergy() >= MekanismUtils.getEnergyPerTick(this, ENERGY_PER_TICK) && gasTank.getStored() >= (int)MekanismUtils.getSecondaryEnergyPerTick(this, SECONDARY_ENERGY_PER_TICK))
{
setActive(true);
@@ -109,7 +109,7 @@ public abstract class TileEntityAdvancedElectricMachine extends TileEntityBasicM
operatingTicks = 0;
}
gasTank.draw(SECONDARY_ENERGY_PER_TICK, true);
gasTank.draw(MekanismUtils.getSecondaryEnergyPerTick(this, SECONDARY_ENERGY_PER_TICK), true);
electricityStored -= MekanismUtils.getEnergyPerTick(this, ENERGY_PER_TICK);
}
else {