From ef087f2bb63125e041e9ca24d77eb1b987a1b5cc Mon Sep 17 00:00:00 2001 From: Jeija Date: Sat, 19 Jan 2013 22:18:28 +0100 Subject: Fix Bug: Wrong usage of action_on/action_off instead of action_change --- mesecons_luacontroller/init.lua | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'mesecons_luacontroller/init.lua') diff --git a/mesecons_luacontroller/init.lua b/mesecons_luacontroller/init.lua index 2a633a6..44c38ff 100644 --- a/mesecons_luacontroller/init.lua +++ b/mesecons_luacontroller/init.lua @@ -170,7 +170,7 @@ end local getdigiline_send = function (pos) local digiline_send = function (channel, msg) if digiline then - digiline:receptor_send(pos, digiline.rules.default, channel, minetest.serialize(msg)) + digiline:receptor_send(pos, digiline.rules.default, channel, msg) end end return digiline_send @@ -325,7 +325,7 @@ local digiline = { receptor = {}, effector = { action = function (pos, node, channel, msg) - lc_update (pos, {type = "digiline", iid = {channel = channel, msg = minetest.deserialize(msg)}}) + lc_update (pos, {type = "digiline", iid = {channel = channel, msg = msg}}) end } } @@ -372,12 +372,9 @@ local mesecons = { effector = { rules = input_rules[cid], - action_on = function (pos, _, rulename) - lc_update(pos, {type="on", pin=rulename}) + action_change = function (pos, _, rulename, newstate) + lc_update(pos, {type=newstate, pin=rulename}) end, - action_off = function (pos, _, rulename) - lc_update(pos, {type="off", pin=rulename}) - end }, receptor = { -- cgit v1.2.3