From 7ed60c75b90fdc89d0b10bc885e5178d61e61062 Mon Sep 17 00:00:00 2001 From: Jeija Date: Wed, 8 Aug 2012 20:33:14 +0200 Subject: Bugfix for the battery: Use receptor_on/off --- mesecons_battery/init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mesecons_battery/init.lua b/mesecons_battery/init.lua index f87ca6d..beddb4c 100644 --- a/mesecons_battery/init.lua +++ b/mesecons_battery/init.lua @@ -97,6 +97,7 @@ nodenames = {"mesecons_battery:battery_charging_1", "mesecons_battery:battery_ch batterystate = batterystate + 1 else node.name=string.gsub(node.name, "charging", "discharging") + mesecon:receptor_on(pos) end if string.find(node.name, tostring(math.ceil(batterystate/20))) == nil then @@ -122,6 +123,7 @@ nodenames = {"mesecons_battery:battery_discharging_1", "mesecons_battery:battery batterystate = batterystate - 1 else node.name=string.gsub(node.name, "discharging", "charging") + mesecon:receptor_off(pos) end if string.find(node.name, tostring(math.ceil(batterystate/20))) == nil then -- cgit v1.2.3