Doors: Fix wood/glass doors not opening or closing
authorThomas--S <Thomas--S@users.noreply.github.com>
Sat, 18 Mar 2017 16:19:19 +0000 (17:19 +0100)
committerparamat <mat.gregory@virginmedia.com>
Sun, 19 Mar 2017 00:43:12 +0000 (00:43 +0000)
Some code was lost during a rebase of a recently merged commit (73e4666).

mods/default/functions.lua

index bf3749a807494972bf413b4a88b9bb50c7c909eb..8e9132d039be6ad246d5436b2086a0b16740e250 100644 (file)
@@ -550,9 +550,9 @@ function default.can_interact_with_node(player, pos)
        end
 
        local meta = minetest.get_meta(pos)
+       local owner = meta:get_string("owner")
 
-       if player:get_player_name() == meta:get_string("owner") then
-               -- Owner can access the node to any time
+       if not owner or owner == "" or owner == player:get_player_name() then
                return true
        end