Skip to content
Snippets Groups Projects
Commit 3ae31cd8 authored by Anthony Zhang's avatar Anthony Zhang
Browse files

Use add_node since place_node only works with ItemStacks and can't specify...

Use add_node since place_node only works with ItemStacks and can't specify param1/param2 value. This fixes pistons pushing pistons/torches/etc.
parent ff5dcda7
No related branches found
No related tags found
No related merge requests found
......@@ -192,7 +192,9 @@ function mesecon:piston_push(pos)
--move the node forward
local nextnode = minetest.env:get_node(pos)
minetest.env:place_node(pos, checknode)
minetest.env:dig_node(checkpos)
minetest.env:add_node(pos, checknode)
mesecon:updatenode(pos)
checknode = nextnode
end
end
......@@ -220,7 +222,8 @@ function mesecon:piston_pull(pos)
and checknode.name ~= "ignore"
and minetest.registered_nodes[checknode.name].liquidtype == "none"
and not mesecon:is_mvps_stopper(checknode.name) then
minetest.env:place_node(pos, checknode)
minetest.env:add_node(pos, checknode)
mesecon:updatenode(pos)
minetest.env:dig_node(checkpos)
mesecon:updatenode(checkpos)
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment