M3gaFr3ak/ExtraCells — pull request #80 by utoxin (2013-11-28 04:41:35+00:00)
Title: Fixing bug with storingPower

I found a bug where if I supplied a redstone signal to the battery, on a network that had a surplus of power, it would continue charging the battery well over its maxPower value. I fixed that bug, and added caching so it doesn't have to check redstone signal levels every tick. This does disable charging the battery when it has a redstone signal though. If that behavior is desired, I can add in additional code to handle that.

* Renamed the variable to make semantics match usage.
* Caching the state of storingPower and updating on block update.
* Fixing logic to correctly return power to the network without overflowing the battery if the network has a surplus.