From 3ae31cd849065eaecf1ecb18f28e37a16ce5d44e Mon Sep 17 00:00:00 2001 From: Anthony Zhang Date: Sat, 27 Oct 2012 12:40:11 -0400 Subject: Use add_node since place_node only works with ItemStacks and can't specify param1/param2 value. This fixes pistons pushing pistons/torches/etc. --- mesecons_pistons/init.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mesecons_pistons/init.lua b/mesecons_pistons/init.lua index c1a640d..fa860cc 100644 --- a/mesecons_pistons/init.lua +++ b/mesecons_pistons/init.lua @@ -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 -- cgit v1.2.3