minetest/minetest — pull request #1096 by Selat (2014-01-13 08:29:39+00:00)
Title: Add circuit simulator.

If I'm not mistaken this implementation of circuit simulator works in O(n * m). Where n - number of circuit elements, and m - average number of connections between them. Each element is defined by a table of values on input and output. So it's easy to add new one. Actually there are some problems with loading circuit when map is loaded. Also each block can have on_activate and on_deactivate methods.