From: upsilon Date: Sat, 25 Mar 2017 16:18:17 +0000 (+0100) Subject: doors: record protection violation if it cannot be dug X-Git-Tag: 0.4.16~42 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7c42c41170996cf477620cbbec97c2a46a397199;p=oweals%2Fminetest_game.git doors: record protection violation if it cannot be dug --- 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)