Added missing local variable

The on_metadata_inventory_take method of digiline_inventory:chest was
broken, since it used a `channel` local variable that was never defined,
but should have been fetched from the node's meta
This commit is contained in:
electrodude 2015-12-18 00:01:02 -05:00
parent 69e1d1ba9b
commit aabf7ec575

View File

@ -127,6 +127,7 @@ minetest.register_node("digilines_inventory:chest", {
minetest.log("action", player:get_player_name().." puts stuff into chest at "..minetest.pos_to_string(pos)) minetest.log("action", player:get_player_name().." puts stuff into chest at "..minetest.pos_to_string(pos))
end, end,
on_metadata_inventory_take = function(pos, listname, index, stack, player) on_metadata_inventory_take = function(pos, listname, index, stack, player)
local channel = minetest.get_meta(pos):get_string("channel")
local inv = minetest.get_meta(pos):get_inventory() local inv = minetest.get_meta(pos):get_inventory()
if inv:is_empty(listname) then if inv:is_empty(listname) then
sendMessage(pos, "empty", channel) sendMessage(pos, "empty", channel)