Replace several get_meta calls with a variable.

This commit is contained in:
Beha
2017-02-24 10:13:43 -05:00
parent 12aac53339
commit 72b022778b
3 changed files with 17 additions and 10 deletions

View File

@ -152,8 +152,9 @@ end
-- maximum: maximum nodes to be pushed
-- 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 = minetest.get_meta(from):get_string("owner")
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