doors: record protection violation if it cannot be dug
This commit is contained in:
parent
08eec2beb7
commit
7c42c41170
@ -203,7 +203,12 @@ end
|
|||||||
|
|
||||||
local function can_dig_door(pos, digger)
|
local function can_dig_door(pos, digger)
|
||||||
replace_old_owner_information(pos)
|
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
|
end
|
||||||
|
|
||||||
function doors.register(name, def)
|
function doors.register(name, def)
|
||||||
|
Loading…
Reference in New Issue
Block a user