From 4ad41474df01d20bc71b7c0f94d9dbdecf055ad8 Mon Sep 17 00:00:00 2001 From: Beha Date: Fri, 24 Feb 2017 14:19:33 -0500 Subject: [PATCH] Remove check for meta existence. --- mesecons_mvps/init.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mesecons_mvps/init.lua b/mesecons_mvps/init.lua index d8e8579..b389597 100644 --- a/mesecons_mvps/init.lua +++ b/mesecons_mvps/init.lua @@ -153,14 +153,13 @@ end -- all_pull_sticky: All nodes are sticky in the direction that they are pulled from function mesecon.mvps_push_or_pull(from, ispulling, pos, stackdir, movedir, maximum, all_pull_sticky) local frommeta = minetest.get_meta(from) - local has_meta = minetest.get_meta(from):to_table() local owner = frommeta:get_string("owner") local tnodes = mesecon.mvps_get_stack(pos, movedir, maximum, all_pull_sticky) if not tnodes then return end -- determine if one of the nodes blocks the push / pull local nodes = {} for id, n in ipairs(tnodes) do - if not has_meta or minetest.is_protected(n.pos, owner) then + if minetest.is_protected(n.pos, owner) then if ispulling then break else @@ -181,7 +180,7 @@ function mesecon.mvps_push_or_pull(from, ispulling, pos, stackdir, movedir, maxi for _, n in ipairs(nodes) do local np = vector.add(n.pos, movedir) - if not has_meta or minetest.is_protected(np, owner) then + if minetest.is_protected(np, owner) then return end end