Commit Graph

30 Commits

Author SHA1 Message Date
Vanessa Ezekowitz 3d19cca557 Add fountainhead (vertical spigot, basically). 2013-10-27 22:38:19 -04:00
Cy 28328d975c Multiple updates:
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-10-14 23:45:07 -04:00
hdastwb ec416df794 added support for 6d facedir for all tube components, changed autoplace.lua 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-19 19:16:26 -04:00
hdastwb 2c89692b4a added locked chests to autoplace.lua 2013-07-08 20:29:53 -04:00
Vanessa Ezekowitz 17ee4f6aab Phased out all deprecated minetest.env:* uses in favor of minetest.* 2013-06-30 23:55:07 -04:00
Vanessa Ezekowitz 01bfa588ce Added support to autoroute code for technic deployer and nodebreaker 2013-06-26 03:34:28 -04:00
Vanessa Ezekowitz afc4981960 actually, filters should only connect from the right/output side since they
can't actually receive anything from the input side via a tube.
2013-06-24 07:59:14 -04:00
Vanessa Ezekowitz 3a0fd39bf6 rewrote autoplacement code to make it more aware of filters,
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-23 21:36:13 -04:00
Vanessa Ezekowitz b68a66ef4a Add vertical version of airtight pipe entry
if automatically rotates to connect to the thing you point at, if a connection
is possible.
2013-06-08 01:00:49 -04:00
Vanessa Ezekowitz d4dddc41ec add flow sensor. Sends mesecons signal when water is flowing through it. 2013-05-10 18:28:57 -04:00
Novatux 4759791034 Added chests and furnaces autoconnect to tubes.
Fixed a bug where autocrafter could bbe used to clone items.
Removed test code.
2013-01-20 07:57:58 +01:00
Novatux b3fcf6734f Added autocrafter.
Fixed a bug where items in mese tubes disappeared whan placing or removing a tube next to it.
2013-01-19 15:37:27 +01:00
Novatux 78d183011e Added a function to register tubes.
Added the mese pipe.
2013-01-16 20:16:14 +01:00
Vanessa Ezekowitz 14102d7c3a made storage tanks connect from top/bottom, made storage tank and pipe
textures use the ^ combine operator so they can show the actual liquid going
through the pipes/tanks.
2013-01-05 21:14:09 -05:00
Vanessa Ezekowitz 88bc800ccb minor spacing tweaks, nothing functional 2013-01-04 01:12:39 -05:00
Vanessa Ezekowitz 6419ecb117 First stage of integrating Mauvebic's water flowing code. This is experimental
and doesn't move water yet - but at least it doesn't break anything :-)
2013-01-04 00:15:23 -05:00
Vanessa Ezekowitz fadd91c744 fixed facedir/rotation bug in placement of expansion tanks. 2013-01-01 18:17:43 -05:00
Vanessa Ezekowitz dc5617db89 changed default orientation of spigot to make it easier to place. 2013-01-01 18:00:16 -05:00
Vanessa Ezekowitz 1a562d23a8 added a "sealed" entry/exit panel (really just a horizontal pipe with a metal
panel overlayed into the middle).   Also, tweaked pipes to always drop the
empty ones.
2013-01-01 16:30:21 -05:00
Vanessa Ezekowitz 6cca6f9857 revamped pumps so that now they should sit in/on liquid and be connected only
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.
2013-01-01 16:04:05 -05:00
Vanessa Ezekowitz 2efaa35700 Added test object for pneumatic tube autorouting code, made tubes connect to
it and any object that bears groups={tubedevice=1} (connects to any side)
2012-09-17 12:32:47 -04:00
Vanessa Ezekowitz 4a834d17b2 Added pneumatic tubes with their own autoplace code (does not connect to
steel pipes).  Fixed a recursion bug that sometimes caused a stack overflow.
2012-08-24 13:39:29 -04:00
Vanessa Ezekowitz 4597b1b59a Added "expansion tank" that appears if the user stacks tanks upwards.
(Downwards is not checked).
2012-08-22 09:56:45 -04:00
Vanessa Ezekowitz 70ea341bf5 Extended storage tank to show fill level in 10% steps (0% to 100%). 2012-08-22 08:24:42 -04:00
Vanessa Ezekowitz a66d9a8564 Added outlet grate, made it participate in autoplace algorithm. 2012-08-22 03:43:38 -04:00
Vanessa Ezekowitz bb168e75e4 made storage tanks' upper/lower fittings and intake grate fitting participate
in pipe autoplace algorithm
2012-08-21 14:49:17 -04:00
Vanessa Ezekowitz 3ddb75217c minor opps/bugfix - devices should not look above/below them normally :-) 2012-08-21 14:38:59 -04:00
Vanessa Ezekowitz 50522aeae9 reorganized code a bit to allow for upcoming rules changes. 2012-08-21 14:32:44 -04:00
Vanessa Ezekowitz 564abfe45a Made storage tank participate in autoplace algorithm. Tuned API a
little to allow for more flexible placement.
2012-08-21 13:52:25 -04:00
Vanessa Ezekowitz a6641f0d20 Pumps and valves now fully participate in the auto-rotate/auto-route process.
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.
2012-08-19 01:56:30 -04:00