From eb0c19f54a625fe91730577503e3adf1cead5cca Mon Sep 17 00:00:00 2001 From: code002lover Date: Sat, 18 Jul 2026 21:12:25 +0200 Subject: [PATCH] safe output ramping, colored display, button flash --- reactor.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/reactor.lua b/reactor.lua index 3988da6..8d90306 100644 --- a/reactor.lua +++ b/reactor.lua @@ -227,6 +227,8 @@ function reactorControl() drawTerminalText(1, i, "Output Gate", fluxgate.getSignalLowFlow()) i = i + 1 drawTerminalText(1, i, "Input Gate", inputFluxgate.getSignalLowFlow()) + i = i + 1 + drawTerminalText(1, i, "Target Output", targetOutput) -- Reactor Control Logic if emergencyCharge then @@ -373,6 +375,12 @@ function changeOutputValue(num, val) else targetOutput = math.max(targetOutput - num, 0) end + + local ri_local = reactor.getReactorInfo() + if not ri_local or ri_local.status ~= "running" then + fluxgate.setSignalLowFlow(targetOutput) + end + updateReactorInfo() save_config() end @@ -509,7 +517,7 @@ function drawUpdatedText(x, y, label, value, color, labelColor) local key = label if lastValues[key] ~= value then labelColor = labelColor or colors.white - f.draw_text_lr(mon, x, y, 3, " ", " ", colors.white, color, colors.black) + f.draw_text_lr(mon, x, y, 3, " ", " ", colors.white, color, colors.black) f.draw_text_lr(mon, x, y, 3, label, value, labelColor, color, colors.black) lastValues[key] = value end