mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-03-21 07:11:22 +00:00
doors: record protection violation if it cannot be dug
This commit is contained in:
parent
08eec2beb7
commit
7c42c41170
1 changed files with 6 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue