summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesecons_battery/init.lua2
1 files changed, 2 insertions, 0 deletions
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