1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-11-16 06:50:18 +01:00

Allow non-players to dig steel doors.

This commit is contained in:
MT-Modder 2016-02-25 18:16:39 -05:00 committed by paramat
parent ac843f8fe7
commit 29252c6fb2

View File

@ -288,7 +288,11 @@ function doors.register(name, def)
return true return true
end end
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
return meta:get_string("doors_owner") == digger:get_player_name() local name = ""
if digger then
name = digger:get_player_name()
end
return meta:get_string("doors_owner") == name
end end
if not def.sounds then if not def.sounds then