From 84971f05b37998ed07267f2d65d7efbbc71bbd70 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Mon, 29 May 2023 16:51:07 +0200 Subject: [PATCH] Fix node state bug --- ta4_power/electricmeter.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/ta4_power/electricmeter.lua b/ta4_power/electricmeter.lua index 23e8f20..ec808cf 100644 --- a/ta4_power/electricmeter.lua +++ b/ta4_power/electricmeter.lua @@ -107,6 +107,7 @@ local function node_timer(pos, elapsed) nvm.load = (data.curr_load1 / data.max_capa1 + data.curr_load2 / data.max_capa2) / 2 * current nvm.moved = data.moved nvm.units = (nvm.units or 0) + data.moved + State:keep_running(pos, nvm) if nvm.countdown > 0 then nvm.countdown = nvm.countdown - (data.moved / techage.CYCLES_PER_DAY) if nvm.countdown <= 0 then