funnel got inventory state command

This commit is contained in:
Joachim Stolberg 2018-09-25 22:53:17 +02:00
parent e39cd59562
commit 0e1bd6f52d
2 changed files with 8 additions and 2 deletions

@ -92,7 +92,7 @@ for _,color in ipairs({"green", "amber", "red"}) do
end, end,
paramtype = "light", paramtype = "light",
light_source = LIGHT_MAX, light_source = 10,
sunlight_propagates = true, sunlight_propagates = true,
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {crumbly=0, not_in_creative_inventory=1}, groups = {crumbly=0, not_in_creative_inventory=1},

@ -147,7 +147,13 @@ tubelib.register_node("tubelib_addons1:funnel", {}, {
end, end,
on_recv_message = function(pos, topic, payload) on_recv_message = function(pos, topic, payload)
if topic == "state" then
local meta = minetest.get_meta(pos)
return tubelib.get_inv_state(meta, "main")
else
return "unsupported" return "unsupported"
end
end, end,
}) })