diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-06-23 21:36:13 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-06-23 21:36:13 -0400 |
commit | 3a0fd39bf670a9210c962381455bb42cd3893fc0 (patch) | |
tree | 22094c4990441be31c887c8e31f8ed15b8460106 /autocrafter.lua | |
parent | 5537257185bd510828295b0c9d7da0e542e801ff (diff) |
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)
Diffstat (limited to 'autocrafter.lua')
-rw-r--r-- | autocrafter.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/autocrafter.lua b/autocrafter.lua index a28faec..1266a20 100644 --- a/autocrafter.lua +++ b/autocrafter.lua @@ -71,11 +71,15 @@ minetest.register_node("pipeworks:autocrafter",{ local meta = minetest.env:get_meta(pos); local inv = meta:get_inventory() return (inv:is_empty("src") and inv:is_empty("recipe") and inv:is_empty("dst")) - end}) + end, + after_place_node = tube_scanforobjects, + after_dig_node = tube_scanforobjects, +}) minetest.register_abm({nodenames={"pipeworks:autocrafter"},interval=1,chance=1, action=function(pos,node) local meta=minetest.env:get_meta(pos) local inv=meta:get_inventory() autocraft(inv) - end}) + end +}) |