Skip to content
Snippets Groups Projects
Commit 0410b5e0 authored by MT-Modder's avatar MT-Modder Committed by paramat
Browse files

Allow non-players to dig bones.

parent 3a98245f
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,11 @@ minetest.register_node("bones:bones", {
can_dig = function(pos, player)
local inv = minetest.get_meta(pos):get_inventory()
return is_owner(pos, player:get_player_name()) and inv:is_empty("main")
local name = ""
if player then
name = player:get_player_name()
end
return is_owner(pos, name) and inv:is_empty("main")
end,
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment