diff options
Diffstat (limited to 'builtin/item.lua')
-rw-r--r-- | builtin/item.lua | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/builtin/item.lua b/builtin/item.lua index bd34efe79..2a9b4ff27 100644 --- a/builtin/item.lua +++ b/builtin/item.lua @@ -318,41 +318,6 @@ function minetest.node_dig(pos, node, digger) end end -function minetest.node_metadata_inventory_move_allow_all(pos, from_list, - from_index, to_list, to_index, count, player) - minetest.log("verbose", "node_metadata_inventory_move_allow_all") - local meta = minetest.env:get_meta(pos) - local inv = meta:get_inventory() - - local from_stack = inv:get_stack(from_list, from_index) - local taken_items = from_stack:take_item(count) - inv:set_stack(from_list, from_index, from_stack) - - local to_stack = inv:get_stack(to_list, to_index) - to_stack:add_item(taken_items) - inv:set_stack(to_list, to_index, to_stack) -end - -function minetest.node_metadata_inventory_offer_allow_all(pos, listname, index, stack, player) - minetest.log("verbose", "node_metadata_inventory_offer_allow_all") - local meta = minetest.env:get_meta(pos) - local inv = meta:get_inventory() - local the_stack = inv:get_stack(listname, index) - the_stack:add_item(stack) - inv:set_stack(listname, index, the_stack) - return ItemStack("") -end - -function minetest.node_metadata_inventory_take_allow_all(pos, listname, index, count, player) - minetest.log("verbose", "node_metadata_inventory_take_allow_all") - local meta = minetest.env:get_meta(pos) - local inv = meta:get_inventory() - local the_stack = inv:get_stack(listname, index) - local taken_items = the_stack:take_item(count) - inv:set_stack(listname, index, the_stack) - return taken_items -end - -- This is used to allow mods to redefine minetest.item_place and so on -- NOTE: This is not the preferred way. Preferred way is to provide enough -- callbacks to not require redefining global functions. -celeron55 |