forked from MineClone5/MineClone5
[mesecons_mvps] fix warnings
This commit is contained in:
parent
43f418c6c0
commit
dc10448c6e
|
@ -1,3 +1,5 @@
|
||||||
|
local table = table
|
||||||
|
|
||||||
--register stoppers for movestones/pistons
|
--register stoppers for movestones/pistons
|
||||||
|
|
||||||
mesecon.mvps_stoppers = {}
|
mesecon.mvps_stoppers = {}
|
||||||
|
@ -6,8 +8,6 @@ mesecon.mvps_droppers = {}
|
||||||
mesecon.on_mvps_move = {}
|
mesecon.on_mvps_move = {}
|
||||||
mesecon.mvps_unmov = {}
|
mesecon.mvps_unmov = {}
|
||||||
|
|
||||||
local is_protected = minetest.is_protected
|
|
||||||
|
|
||||||
--- Objects (entities) that cannot be moved
|
--- Objects (entities) that cannot be moved
|
||||||
function mesecon.register_mvps_unmov(objectname)
|
function mesecon.register_mvps_unmov(objectname)
|
||||||
mesecon.mvps_unmov[objectname] = true;
|
mesecon.mvps_unmov[objectname] = true;
|
||||||
|
@ -151,6 +151,7 @@ function mesecon.mvps_get_stack(pos, dir, maximum, piston_pos)
|
||||||
-- add connected nodes to frontiers, connected is a vector list
|
-- add connected nodes to frontiers, connected is a vector list
|
||||||
-- the vectors must be absolute positions
|
-- the vectors must be absolute positions
|
||||||
local connected = {}
|
local connected = {}
|
||||||
|
local has_loop
|
||||||
if minetest.registered_nodes[nn.name]
|
if minetest.registered_nodes[nn.name]
|
||||||
and minetest.registered_nodes[nn.name].mvps_sticky then
|
and minetest.registered_nodes[nn.name].mvps_sticky then
|
||||||
connected, has_loop = minetest.registered_nodes[nn.name].mvps_sticky(np, nn, piston_pos)
|
connected, has_loop = minetest.registered_nodes[nn.name].mvps_sticky(np, nn, piston_pos)
|
||||||
|
@ -258,7 +259,7 @@ function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, player_name,
|
||||||
n.meta = minetest.get_meta(n.pos):to_table()
|
n.meta = minetest.get_meta(n.pos):to_table()
|
||||||
local is_dropper = mesecon.is_mvps_dropper(n.node, movedir, nodes, id)
|
local is_dropper = mesecon.is_mvps_dropper(n.node, movedir, nodes, id)
|
||||||
if is_dropper then
|
if is_dropper then
|
||||||
local drops = minetest.get_node_drops(n.node.name, "")
|
--local drops = minetest.get_node_drops(n.node.name, "")
|
||||||
minetest.dig_node(n.pos)
|
minetest.dig_node(n.pos)
|
||||||
else
|
else
|
||||||
minetest.remove_node(n.pos)
|
minetest.remove_node(n.pos)
|
||||||
|
|
Loading…
Reference in New Issue