Fix missing localization for obj
authorHybridDog <ovvv@web.de>
Fri, 18 Dec 2015 16:38:25 +0000 (17:38 +0100)
committerest31 <MTest31@outlook.com>
Sun, 20 Dec 2015 15:25:33 +0000 (16:25 +0100)
builtin/game/item.lua

index 6c2214ef6360964916e836b599e1ebf87a685d54..d16601d30947c7b776e8fa13577f9f1e382045ec 100644 (file)
@@ -27,19 +27,11 @@ function core.get_pointed_thing_position(pointed_thing, above)
                if above then
                        -- The position where a node would be placed
                        return pointed_thing.above
-               else
-                       -- The position where a node would be dug
-                       return pointed_thing.under
                end
+               -- The position where a node would be dug
+               return pointed_thing.under
        elseif pointed_thing.type == "object" then
-               obj = pointed_thing.ref
-               if obj ~= nil then
-                       return obj:getpos()
-               else
-                       return nil
-               end
-       else
-               return nil
+               return pointed_thing.ref and pointed_thing.ref:getpos()
        end
 end