Skip to content

Commit

Permalink
doors: record protection violation if it cannot be dug
Browse files Browse the repository at this point in the history
  • Loading branch information
paly2 authored and paramat committed Mar 26, 2017
1 parent 08eec2b commit 7c42c41
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mods/doors/init.lua
Expand Up @@ -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)
Expand Down

0 comments on commit 7c42c41

Please sign in to comment.