Commit Graph

20 Commits

Author SHA1 Message Date
Cy
ce1acebf6d Check for on_metadata_inventory_take 2013-10-15 18:37:45 -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
Vanessa Ezekowitz
26bcbd8d6f fixed a nil reference (filter code didn't check for unknown nodes) 2013-07-15 18:50:28 -04:00
Vanessa Ezekowitz
17ee4f6aab Phased out all deprecated minetest.env:* uses in favor of minetest.* 2013-06-30 23:55:07 -04:00
Novatux
89be094a1e Add option to disable cyclic behaviour 2013-06-28 15:16:28 +02: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
9a42a5f18b workaround for transported items sometimes just appearing out of nowhere
but not being diggable.  Made them have a really tiny collision box so
they can be pointed at if carefully done
2013-06-21 02:56:21 -04:00
Novatux
14adc2fd9b Fix crash sometimes with tubes 2013-06-05 15:55:56 +02:00
bas080
e271dc0818 retouched the formspec of the filter and mese-filter 2013-04-03 12:16:33 +02:00
Anthony
d784213a94 Fix tube connection to filters
Tubes did not previously connect to filters when the filters were placed after the tube.
2013-04-01 14:21:39 -03:00
Novatux
615157923f Added mese filter (takes full stack). 2013-01-28 18:41:14 +01:00
Novatux
fe0fd68601 Changed the name of some textures for naming conventions. Added deployer and node breaker (most of the code is from Technic, the textures too). 2013-01-20 17:53:17 +01: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
5edb7a61a3 Changed mese tubes: you can now choose if items should not go in a direction. 2013-01-19 19:11:28 +01:00
Novatux
a77095ebe6 Fixed a bug where items were not moved after teleport tube when they went to the same direction. 2013-01-19 17:13:47 +01:00
Novatux
aea0207b7f Added accelrator and teleport pipes 2013-01-19 13:14:41 +01:00
Novatux
78d183011e Added a function to register tubes.
Added the mese pipe.
2013-01-16 20:16:14 +01:00
Novatux
315f9dee59 Updated the last version of item_transport 2013-01-14 15:01:48 -05:00
Vanessa Ezekowitz
109729cfb2 Added Nore's item transport mod and integrated it into pipeworks
Items can now flow from one chest (or Nore's filter object) to another via the
pneumatic tubes!  Thanks to Nore and RealBadAngel for the code.

Note that this mod has to redefine the default chests and furnaces (see
compat.lua) in order to add some new group definitions so that tubes can
appear to connect to these objects.
2013-01-13 21:45:03 -05:00