summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelectrodude <electrodude512@gmail.com>2015-12-18 00:01:02 -0500
committerelectrodude <electrodude512@gmail.com>2016-01-18 11:44:10 -0500
commitaabf7ec57595d849fa18d631edec9d53bd7251e2 (patch)
tree9c3e1c9e7330335ab4c9639940697140bb55b33a
parent69e1d1ba9b2437790fbeb9f250086ed4a0cdebbb (diff)
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
-rw-r--r--digilines_inventory/init.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/digilines_inventory/init.lua b/digilines_inventory/init.lua
index 89aaabc..f0a2053 100644
--- a/digilines_inventory/init.lua
+++ b/digilines_inventory/init.lua
@@ -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))
end,
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()
if inv:is_empty(listname) then
sendMessage(pos, "empty", channel)