milan2018 #1

Merged
milan merged 87 commits from milan2018 into master 2020-04-01 20:54:51 +02:00
Showing only changes of commit aded3b0d47 - Show all commits

View file

@ -597,6 +597,24 @@ minetest.register_node("protector:chest", {
end,
on_blast = function() end,
tube = {
insert_object = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
return inv:add_item("main", stack)
end,
can_insert = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if meta:get_int("split_material_stacks") == 1 then
stack = stack:peek_item(1)
end
return inv:room_for_item("main", stack)
end,
input_inventory = "main",
connect_sides = {left = 1, right = 1, back = 1, front = 1, bottom = 1, top = 1}
},
})
-- Protected Chest formspec buttons