Bugfix, use param2 for conductors when turning them on/off

This commit is contained in:
Jeija 2012-12-15 21:23:38 +01:00
parent c0d3bd2abb
commit 5fb5df446c

@ -281,7 +281,7 @@ function mesecon:turnon(pos)
if mesecon:is_conductor_off(node.name) then
local rules = mesecon:conductor_get_rules(node)
minetest.env:add_node(pos, {name = mesecon:get_conductor_on(node.name)})
minetest.env:add_node(pos, {name = mesecon:get_conductor_on(node.name), param2 = node.param2})
for _, rule in ipairs(rules) do
local np = mesecon:addPosRule(pos, rule)
@ -305,7 +305,7 @@ function mesecon:turnoff(pos)
if mesecon:is_conductor_on(node.name) then
local rules = mesecon:conductor_get_rules(node)
minetest.env:add_node(pos, {name = mesecon:get_conductor_off(node.name)})
minetest.env:add_node(pos, {name = mesecon:get_conductor_off(node.name), param2 = node.param2})
for _, rule in ipairs(rules) do
local np = mesecon:addPosRule(pos, rule)