made the node factory stuff nicer to use. the backing code has become somewhat ugly, but that's just java's fault so whatever. it is now possible to write something along the lines of api.Network.newNode(host, name, visibility).withComponent().withConnector(bufferSize).create(), which reads pretty nicely; power is back, but with a few changes. for one, the "running cost" is gone, since that was really just confusing, and would have resulted in frequent updates once the buffers are full/empty anyway (once because we'd have to check whether to fill up or not, once to check if we have enough power or not). it's just much more intuitive to just have a buffer per powered entity that can be filled/emptied as needed. also, there's no differentiation between consumers and producers anymore. producers just fill up their buffers, while consumers empty their buffers. the power distributor now simply takes care of balancing the amount of energy in all buffers connected to the same network it is connected to. multiple distributors don't need any special logic this way, either, since the first one to update simply marks all processed buffers as clean (if they were dirty due to changes); renamed PowerSupply to PowerConverter
18 files changed