sirkut/InfernalRobotics — pull request #25 by marce155 (2014-08-31 17:31:10+00:00)
Title: added EC consumption

This is the expected behavior:
I added a KSPField (float) ElectricChargeRequired which defaults to 2.5
(more than a light bulb but much less than an electrolysis of water).
If only 1 servo is in a group it consumes the timewarp fraction of that
every fixedUpdate. If there is not enough EC it first starts to slow
down its movement speed (linear). If there is less than 10% of the
required amount it still plays the sound and consumes EC but can’t
overcome the friction and don’t move (via a speed of 0 to break as few
things as possible).
If there are multiple servos per group I considered it strange if only
some of them move because they were processed earlier when some EC was
still available. So I built the whole system on the basis of
servo-groups who all move with the same speed reduction applied or don’t
move at all (at least they don’t move together).
Additionally I added a power consumption display in the action menu and a
total amount for each group in the group edit window to allow for easier
planning.

Sirkut: I changed/added more than I had planned. If you don’t like
something feel free to remove/change. I tried to stick with your style conventions and also did not reformat the file (since my ReSharper is set to a very aggressive refactoring), hope it's understandable.