1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-07-03 23:20:22 +02:00

add default.set_inventory_action_loggers function

This commit is contained in:
nixnoxus
2022-04-02 04:46:38 +02:00
parent 9d171b268c
commit 8b8c693edd
4 changed files with 22 additions and 38 deletions

View File

@ -222,16 +222,7 @@ function default.chest.register_chest(prefixed_name, d)
end
end
def.on_metadata_inventory_move = function(pos, from_list, from_index,
to_list, to_index, count, player)
default.log_action(player, pos, "moves stuff in chest")
end
def.on_metadata_inventory_put = function(pos, listname, index, stack, player)
default.log_action(player, pos, "moves " .. stack:get_name() .. " to chest")
end
def.on_metadata_inventory_take = function(pos, listname, index, stack, player)
default.log_action(player, pos, "takes " .. stack:get_name() .. " from chest")
end
default.set_inventory_action_loggers(def, "chest")
local def_opened = table.copy(def)
local def_closed = table.copy(def)