diff options
author | h-v-smacker <hans-von-smacker+github@gmail.com> | 2017-11-30 22:21:25 +0300 |
---|---|---|
committer | h-v-smacker <hans-von-smacker+github@gmail.com> | 2017-11-30 22:21:25 +0300 |
commit | 787f52467c40401c2d3a23f8b46b793eded63043 (patch) | |
tree | 397aebf8c85f3578c2b94b7824e20827ff29a784 | |
parent | a6a9c692f10b8d394713840806b5cba5d51c4b55 (diff) | |
parent | f89c01505dae31e1d63677675d2477980417632d (diff) |
Merge branch 'pipeworks_compatibility'
Makes automated fermenting possible
-rw-r--r-- | depends.txt | 1 | ||||
-rw-r--r-- | init.lua | 24 |
2 files changed, 24 insertions, 1 deletions
diff --git a/depends.txt b/depends.txt index 53a9e75..6efe685 100644 --- a/depends.txt +++ b/depends.txt @@ -1,3 +1,4 @@ default intllib? lucky_block? +pipeworks?
\ No newline at end of file @@ -176,8 +176,9 @@ minetest.register_node("wine:wine_barrel", { mesh = "wine_barrel.obj", paramtype = "light", paramtype2 = "facedir", - groups = {choppy = 2, oddly_breakable_by_hand = 1}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, tubedevice = 1, tubedevice_receiver = 1}, legacy_facedir_simple = true, +-- on_place = minetest.rotate_node, on_construct = function(pos) local meta = minetest.get_meta(pos) @@ -244,6 +245,27 @@ minetest.register_node("wine:wine_barrel", { return 0 end end, + + tube = (function() if minetest.get_modpath("pipeworks") then return { + -- using a different stack from defaut when inserting + insert_object = function(pos, node, stack, direction) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local timer = minetest.get_node_timer(pos) + if not timer:is_started() then + timer:start(1.0) + end + return inv:add_item("src", stack) + end, + can_insert = function(pos,node,stack,direction) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + return inv:room_for_item("src", stack) + end, + -- the default stack, from which objects will be taken + input_inventory = "dst", + connect_sides = {left = 1, right = 1, back = 1, front = 1, bottom = 1, top = 1} + } end end)(), }) minetest.register_craft({ |