Bug: doors had a error on open
This commit is contained in:
parent
fd6bf07064
commit
424ef678e7
|
@ -89,12 +89,21 @@ for i,k in ipairs(doors) do
|
||||||
def_after_place_node(pos, node, clicker, itemstack, pointed_thing)
|
def_after_place_node(pos, node, clicker, itemstack, pointed_thing)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if def_can_dig then
|
||||||
clonenode.can_dig = function(pos, digger)
|
clonenode.can_dig = function(pos, digger)
|
||||||
if factions.can_use_node(pos, digger:get_player_name(),"door") then
|
if factions.can_use_node(pos, digger:get_player_name(),"door") then
|
||||||
return def_can_dig(pos, digger)
|
return def_can_dig(pos, digger)
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
clonenode.can_dig = function(pos, digger)
|
||||||
|
if factions.can_use_node(pos, digger:get_player_name(),"door") then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
minetest.register_node(":"..k,clonenode)
|
minetest.register_node(":"..k,clonenode)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user