forked from thunderdog1138/star_wars
Doors: Avoid crash on nil player in 'can dig door'
This commit is contained in:
parent
12f1703537
commit
d5907d5f1e
|
@ -203,12 +203,7 @@ 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)
|
||||||
if default.can_interact_with_node(digger, pos) then
|
return default.can_interact_with_node(digger, pos)
|
||||||
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