From 0b50136116036940eb5ca2025b9801fdd46dbefc Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Sun, 24 Mar 2024 10:14:11 +0100 Subject: [PATCH] Fix bug #24 (Energy Storage respawn red gravel infinit) --- energy_storage/heatexchanger2.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/energy_storage/heatexchanger2.lua b/energy_storage/heatexchanger2.lua index 4aee1a9..cfa854e 100644 --- a/energy_storage/heatexchanger2.lua +++ b/energy_storage/heatexchanger2.lua @@ -163,8 +163,10 @@ end local function check_TES_integrity(pos, nvm) nvm.ticks = (nvm.ticks or 0) + 1 - if (nvm.ticks % 5) == 0 then -- every 10 saec - glowing(pos, nvm, (nvm.capa or 0) / (nvm.capa_max or 1) > 0.8) + if (nvm.ticks % 5) == 0 then -- every 10 sec + if techage.is_running(nvm) then + glowing(pos, nvm, (nvm.capa or 0) / (nvm.capa_max or 1) > 0.8) + end end if (nvm.ticks % 30) == 0 then -- every minute return heatexchanger1_cmnd(pos, "volume")