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

add default.log_action function

This commit is contained in:
nixnoxus
2022-03-30 23:57:08 +02:00
parent 659895c3ed
commit 876a2f7cef
4 changed files with 19 additions and 22 deletions

View File

@ -75,18 +75,15 @@ minetest.register_node("vessels:shelf", {
return 0
end,
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
minetest.log("action", player:get_player_name() ..
" moves stuff in vessels shelf at ".. minetest.pos_to_string(pos))
default.log_action(player, pos, "moves stuff in vessels shelf")
update_vessels_shelf(pos)
end,
on_metadata_inventory_put = function(pos, listname, index, stack, player)
minetest.log("action", player:get_player_name() ..
" moves stuff to vessels shelf at ".. minetest.pos_to_string(pos))
default.log_action(player, pos, "moves stuff to vessels shelf")
update_vessels_shelf(pos)
end,
on_metadata_inventory_take = function(pos, listname, index, stack, player)
minetest.log("action", player:get_player_name() ..
" takes stuff from vessels shelf at ".. minetest.pos_to_string(pos))
default.log_action(player, pos, "takes stuff from vessels shelf")
update_vessels_shelf(pos)
end,
on_blast = function(pos)