summaryrefslogtreecommitdiff
path: root/autoplace.lua
AgeCommit message (Collapse)Author
2013-10-14Multiple updates:Cy
1) Refactor autoplace, There was a lot of redundant code and like a dozen unneccessary string scans for every node next to every tube placed! I put it all into indexed tables and loops instead of bizarre and unexplainable variable names and copy and pasted code. There was also no support for notifying a chest when an item has been taken from it by a filter, so I added something for that. I also thought it prudent to fall back on the allow_metadata_inventory_take function should a special can_remove not exist. In fact if can_insert doesn't exist, it calls allow_metadata_inventory_put instead. I also added a thing for allowing pipes to attach to nodes of other modules, without having to hard code type all those node names into autoplace.lua. Basically node.tube.collects(i,param2) and i is the direction from the pipe and param2 is the param2 of what it's pointing at. I also abstracted the inscrutable correlation between i and param2 by trial and error (and the paramwand mod) into understandable functions. There was no pipeworks namespace so I created it, and put these functions into pipeworks.collects (as distinguished from a node.tube.collects function, which uses those functions) And now it's too late to cart my old clothes to the thrift store, dangit. 2) My "node.tube.collects" idea might be redundant with the node.tube.connect_sides thing, though possibly more versatile so I'll leave it in. 3) I was using node.tube.connects and fancy functions for checking if it's the sides or top or whatnot, and this connect_side thing came in. This should make both my way and the way using connect_side work. Also removed some debugging cruft
2013-07-19added support for 6d facedir for all tube components, changed autoplace.lua ↵hdastwb
to follow tubes.connect_sides rather than having each component coded individually, and added support for placing deployers and node breakers facing vertically
2013-07-08added locked chests to autoplace.luahdastwb
2013-06-30Phased out all deprecated minetest.env:* uses in favor of minetest.*Vanessa Ezekowitz
2013-06-26Added support to autoroute code for technic deployer and nodebreakerVanessa Ezekowitz
2013-06-24actually, filters should only connect from the right/output side since theyVanessa Ezekowitz
can't actually receive anything from the input side via a tube.
2013-06-23rewrote autoplacement code to make it more aware of filters,Vanessa Ezekowitz
autocrafter, nodebreaker, deployer, and made sure each item will only initiate a connection to those sides which can accept such. Fixed various autorouting bugs as I ran across them. Autorouting for various devices is now: filters: left and right sides only nodebreaker, deployer: back only autocrafter: all six sides chests: top, bottom, left, right, back (not front) furnace: bottom, left, right, back (not the top or front)
2013-06-08Add vertical version of airtight pipe entryVanessa Ezekowitz
if automatically rotates to connect to the thing you point at, if a connection is possible.
2013-05-10add flow sensor. Sends mesecons signal when water is flowing through it.Vanessa Ezekowitz
2013-01-20Added chests and furnaces autoconnect to tubes.Novatux
Fixed a bug where autocrafter could bbe used to clone items. Removed test code.
2013-01-19Added autocrafter.Novatux
Fixed a bug where items in mese tubes disappeared whan placing or removing a tube next to it.
2013-01-16Added a function to register tubes.Novatux
Added the mese pipe.
2013-01-05made storage tanks connect from top/bottom, made storage tank and pipeVanessa Ezekowitz
textures use the ^ combine operator so they can show the actual liquid going through the pipes/tanks.
2013-01-04minor spacing tweaks, nothing functionalVanessa Ezekowitz
2013-01-04First stage of integrating Mauvebic's water flowing code. This is experimentalVanessa Ezekowitz
and doesn't move water yet - but at least it doesn't break anything :-)
2013-01-01fixed facedir/rotation bug in placement of expansion tanks.Vanessa Ezekowitz
2013-01-01changed default orientation of spigot to make it easier to place.Vanessa Ezekowitz
2013-01-01added a "sealed" entry/exit panel (really just a horizontal pipe with a metalVanessa Ezekowitz
panel overlayed into the middle). Also, tweaked pipes to always drop the empty ones.
2013-01-01revamped pumps so that now they should sit in/on liquid and be connected onlyVanessa Ezekowitz
from the top, relegated grates to decorational-only, added outlet spigot. Got rid of a few obsolete textures. Got rid of that whole _x and _z naming thing, now all directional devices (pumps, valves, spigots, tanks) use facedir. Valves, spigots no longer auto-rotate to find nearby pipes.
2012-09-17Added test object for pneumatic tube autorouting code, made tubes connect toVanessa Ezekowitz
it and any object that bears groups={tubedevice=1} (connects to any side)
2012-08-24Added pneumatic tubes with their own autoplace code (does not connect toVanessa Ezekowitz
steel pipes). Fixed a recursion bug that sometimes caused a stack overflow.
2012-08-22Added "expansion tank" that appears if the user stacks tanks upwards.Vanessa Ezekowitz
(Downwards is not checked).
2012-08-22Extended storage tank to show fill level in 10% steps (0% to 100%).Vanessa Ezekowitz
2012-08-22Added outlet grate, made it participate in autoplace algorithm.Vanessa Ezekowitz
2012-08-21made storage tanks' upper/lower fittings and intake grate fitting participateVanessa Ezekowitz
in pipe autoplace algorithm
2012-08-21minor opps/bugfix - devices should not look above/below them normally :-)Vanessa Ezekowitz
2012-08-21reorganized code a bit to allow for upcoming rules changes.Vanessa Ezekowitz
2012-08-21Made storage tank participate in autoplace algorithm. Tuned API aVanessa Ezekowitz
little to allow for more flexible placement.
2012-08-19Pumps and valves now fully participate in the auto-rotate/auto-route process.Vanessa Ezekowitz
These devices can only be connected to horizontal pipes or to each other. Note that only the device being placed and the pipes around it will adapt; if you have a valve and pump next to one another and they won't connect, put a piece of pipe at one end to show the auto-rotator which way they should go. Removal of a pipe or device will not change the orientation of surrounding devices.