doors: record protection violation if it cannot be dug

This commit is contained in:
upsilon 2017-03-25 17:18:17 +01:00 committed by paramat
parent 08eec2beb7
commit 7c42c41170

@ -203,7 +203,12 @@ end
local function can_dig_door(pos, digger)
replace_old_owner_information(pos)
return default.can_interact_with_node(digger, pos)
if default.can_interact_with_node(digger, pos) then
return true
else
minetest.record_protection_violation(pos, digger:get_player_name())
return false
end
end
function doors.register(name, def)