summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2012-12-15 21:23:38 +0100
committerJeija <norrepli@gmail.com>2012-12-15 21:23:38 +0100
commit5fb5df446c89516c93a9375125cdd6ffd5db4054 (patch)
treec09dd8569e9417f89bbc6c03d29e4dd7273a1ca0
parentc0d3bd2abbeb8db0d640a604af1c9756f79f4881 (diff)
downloadmesecons-5fb5df446c89516c93a9375125cdd6ffd5db4054.tar
mesecons-5fb5df446c89516c93a9375125cdd6ffd5db4054.tar.gz
mesecons-5fb5df446c89516c93a9375125cdd6ffd5db4054.tar.bz2
mesecons-5fb5df446c89516c93a9375125cdd6ffd5db4054.tar.xz
mesecons-5fb5df446c89516c93a9375125cdd6ffd5db4054.zip
Bugfix, use param2 for conductors when turning them on/off
-rw-r--r--mesecons/internal.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesecons/internal.lua b/mesecons/internal.lua
index 0249728..de05bec 100644
--- a/mesecons/internal.lua
+++ b/mesecons/internal.lua
@@ -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)