From 780b39d23cbaac19fe44bc2bbc832cf159e153c4 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Fri, 23 Jun 2023 15:31:20 +0200 Subject: [PATCH] Enable the use as elevator winch --- ta2_energy_storage/ta2_winch.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ta2_energy_storage/ta2_winch.lua b/ta2_energy_storage/ta2_winch.lua index d682df8..a75bb1d 100644 --- a/ta2_energy_storage/ta2_winch.lua +++ b/ta2_energy_storage/ta2_winch.lua @@ -140,6 +140,8 @@ minetest.register_node("techage:ta2_winch", { remove_chest(pos) nvm.running = true power.start_storage_calc(pos, Axle, outdir) + elseif not nvm.running then + techage.renew_rope(pos, 50) elseif nvm.running and nvm.load == 0 and not power.power_available(pos, Axle, outdir) then add_chest(pos) nvm.running = false @@ -185,7 +187,9 @@ techage.register_node({"techage:ta2_winch"}, { on_node_load = function(pos, node) minetest.get_node_timer(pos):start(CYCLE_TIME) local nvm = techage.get_nvm(pos) - add_chest_entity(pos, nvm) + if nvm.running then + add_chest_entity(pos, nvm) + end end, })