diff --git a/mods/default/init.lua b/mods/default/init.lua index 7369a1e3..690bb699 100644 --- a/mods/default/init.lua +++ b/mods/default/init.lua @@ -1184,7 +1184,7 @@ minetest.register_node("default:chest", { minetest.log("action", player:get_player_name().. " moves stuff to chest at "..minetest.pos_to_string(pos)) end, - on_metadata_inventory_take = function(pos, listname, index, count, player) + on_metadata_inventory_take = function(pos, listname, index, stack, player) minetest.log("action", player:get_player_name().. " takes stuff from chest at "..minetest.pos_to_string(pos)) end, @@ -1249,7 +1249,7 @@ minetest.register_node("default:chest_locked", { end return stack:get_count() end, - allow_metadata_inventory_take = function(pos, listname, index, count, player) + allow_metadata_inventory_take = function(pos, listname, index, stack, player) local meta = minetest.env:get_meta(pos) if not has_locked_chest_privilege(meta, player) then minetest.log("action", player:get_player_name().. @@ -1258,7 +1258,7 @@ minetest.register_node("default:chest_locked", { minetest.pos_to_string(pos)) return 0 end - return count + return stack:get_count() end, on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) minetest.log("action", player:get_player_name().. @@ -1268,7 +1268,7 @@ minetest.register_node("default:chest_locked", { minetest.log("action", player:get_player_name().. " moves stuff to locked chest at "..minetest.pos_to_string(pos)) end, - on_metadata_inventory_take = function(pos, listname, index, count, player) + on_metadata_inventory_take = function(pos, listname, index, stack, player) minetest.log("action", player:get_player_name().. " takes stuff from locked chest at "..minetest.pos_to_string(pos)) end,