From 7c42c41170996cf477620cbbec97c2a46a397199 Mon Sep 17 00:00:00 2001 From: upsilon Date: Sat, 25 Mar 2017 17:18:17 +0100 Subject: [PATCH] doors: record protection violation if it cannot be dug --- mods/doors/init.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mods/doors/init.lua b/mods/doors/init.lua index 2b3d094a..974e9d3d 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -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) -- 2.25.1