From 42cc6d2c311d4b70f328d3e31554bf90dd9fc45e Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 2 Jan 2016 12:04:31 +0000 Subject: [PATCH] Add item name to chest log messages --- mods/default/nodes.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index 1e39be99..3b70c2b4 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -1445,11 +1445,13 @@ minetest.register_node("default:chest", { end, on_metadata_inventory_put = function(pos, listname, index, stack, player) minetest.log("action", player:get_player_name() .. - " moves stuff to chest at " .. minetest.pos_to_string(pos)) + " moves " .. stack:get_name() .. + " to chest at " .. minetest.pos_to_string(pos)) end, 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)) + " takes " .. stack:get_name() .. + " from chest at " .. minetest.pos_to_string(pos)) end, }) @@ -1505,11 +1507,13 @@ minetest.register_node("default:chest_locked", { end, on_metadata_inventory_put = function(pos, listname, index, stack, player) minetest.log("action", player:get_player_name() .. - " moves stuff to locked chest at " .. minetest.pos_to_string(pos)) + " moves " .. stack:get_name() .. + " to locked chest at " .. minetest.pos_to_string(pos)) end, 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)) + " takes " .. stack:get_name() .. + " from locked chest at " .. minetest.pos_to_string(pos)) end, on_rightclick = function(pos, node, clicker) local meta = minetest.get_meta(pos) -- 2.25.1