AppliedEnergistics/Applied-Energistics-2 — pull request #580 by yueh (2014-12-11 20:18:27+00:00)
Title: Added a rate based output to level emitters

I needed a simple way to detect items getting inserted into a ME network and it is easier to hack it into AE2 itself instead of trying stuff like CC or OC.
As it worked and also is a existing FR with #25, I decided to take the extra bit of work to make it usable.

**Basic changes**
* Level Emitters are now upgradeable with Redstone Cards.
* Level Emitters are now IGridTickable, but put to `SLEEP` without a Redstone Card. Tickrates are [20, 60].
* The GUI disables the buttons for +/-10, +/-100, +/-1000 with a Redstone Card, as well as limits the input range to [0, 16)
* Works for items and power as well as low and high signal setting.
* Still a single upgrade slot, not combinable with a Fuzzy Card.

**Added functionality**
Adding a Redstone Card will change them to monitor the network for changes instead of monitor an exact itemstack or power threshold.
With the default setting it will slowly increase the redstone strength from 0 to 15 as long as the specified item is inserted into the network.
It will then slowly decrease to 0 of nothing changes or items are extracted.
The input field allows the user to define a base strength as idle state. Extracting items will then cause it to fall below this value, allowing to monitor items being extracted.
Setting it to something in between 0 and 15 will allow it to monitor both direction, but but less states for each.

The same applies to the power consumption, but based on comparing the average power consumption and injection.

Changing the redstone mode will invert the signal.

**Possible improvments**
The redstone strength is currently just a indication somewhat imprecise time since when the item/power is inserted or extracted.
It might be an idea to scale it with the quantity of items inserted between two ticks. Similar to the acceleration cards, 1 item/tick would be +/-1 strength, 8 items => 2, 32 => 3, 64 => 4, 96 => 5 and whatever the IO Port can output (2048 items/tick or so). But never above this values, if the threshold is not exceeded.

Or how much it changes the strength with each tick based on that. Still increasing to max strength, but a greater change each tick.