Notify of bone coordinate

This commit is contained in:
Rui914 2015-08-15 08:51:39 +09:00
parent e2033025b0
commit a06e0fe83d
2 changed files with 9 additions and 0 deletions

View file

@ -22,3 +22,6 @@
# The radius of a TNT explosion
#tnt_radius = 3
#Notify player with the location of their dropped bones
#show_bone_pos = false

View file

@ -181,6 +181,12 @@ minetest.register_on_dieplayer(function(player)
end
minetest.set_node(pos, {name="bones:bones", param2=param2})
if minetest.setting_getbool("show_bone_pos") == true then
local pos_string = minetest.pos_to_string(pos)
minetest.chat_send_player(player_name, "Your bones were left at "..pos_string)
minetest.log("action", player_name.." left their bones at "..pos_string)
end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()