Merge pull request #28 from electrodude/bugs

Add missing local variable
This commit is contained in:
Florian Euchner 2016-01-19 17:09:40 +01:00
commit 60c3e608a9
1 changed files with 3 additions and 1 deletions

View File

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