Only destroy bones if inventory is empty. closes #1
parent
e8f10dceff
commit
839ecdfa5a
|
@ -119,8 +119,10 @@ minetest.register_node("bones:bones", {
|
||||||
minetest.log("action", name.." unloaded his fresh bones at "..minetest.pos_to_string(pos))
|
minetest.log("action", name.." unloaded his fresh bones at "..minetest.pos_to_string(pos))
|
||||||
|
|
||||||
-- destroy the bone node
|
-- destroy the bone node
|
||||||
minetest.set_node(pos, {name="air", param1=0, param2=0})
|
if bones_inv:is_empty("main") then
|
||||||
minetest.log("action","Destroying bones "..minetest.pos_to_string(pos))
|
minetest.set_node(pos, {name="air", param1=0, param2=0})
|
||||||
|
minetest.log("action","Destroying bones "..minetest.pos_to_string(pos))
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
can_dig = function(pos, player)
|
can_dig = function(pos, player)
|
||||||
return is_owner(pos, player:get_player_name())
|
return is_owner(pos, player:get_player_name())
|
||||||
|
|
Loading…
Reference in New Issue