Skip to content

Commit 7c42c41

Browse files
paly2paramat
authored andcommittedMar 26, 2017
doors: record protection violation if it cannot be dug
1 parent 08eec2b commit 7c42c41

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

Diff for: ‎mods/doors/init.lua

+6-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,12 @@ end
203203

204204
local function can_dig_door(pos, digger)
205205
replace_old_owner_information(pos)
206-
return default.can_interact_with_node(digger, pos)
206+
if default.can_interact_with_node(digger, pos) then
207+
return true
208+
else
209+
minetest.record_protection_violation(pos, digger:get_player_name())
210+
return false
211+
end
207212
end
208213

209214
function doors.register(name, def)

0 commit comments

Comments
 (0)
Please sign in to comment.