Compare commits
2
Commits
3ab120b1fe
...
24de5f3626
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24de5f3626 | ||
|
|
eb0c19f54a |
+9
-1
@@ -227,6 +227,8 @@ function reactorControl()
|
|||||||
drawTerminalText(1, i, "Output Gate", fluxgate.getSignalLowFlow())
|
drawTerminalText(1, i, "Output Gate", fluxgate.getSignalLowFlow())
|
||||||
i = i + 1
|
i = i + 1
|
||||||
drawTerminalText(1, i, "Input Gate", inputFluxgate.getSignalLowFlow())
|
drawTerminalText(1, i, "Input Gate", inputFluxgate.getSignalLowFlow())
|
||||||
|
i = i + 1
|
||||||
|
drawTerminalText(1, i, "Target Output", targetOutput)
|
||||||
|
|
||||||
-- Reactor Control Logic
|
-- Reactor Control Logic
|
||||||
if emergencyCharge then
|
if emergencyCharge then
|
||||||
@@ -373,6 +375,12 @@ function changeOutputValue(num, val)
|
|||||||
else
|
else
|
||||||
targetOutput = math.max(targetOutput - num, 0)
|
targetOutput = math.max(targetOutput - num, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local ri_local = reactor.getReactorInfo()
|
||||||
|
if not ri_local or ri_local.status ~= "running" then
|
||||||
|
fluxgate.setSignalLowFlow(targetOutput)
|
||||||
|
end
|
||||||
|
|
||||||
updateReactorInfo()
|
updateReactorInfo()
|
||||||
save_config()
|
save_config()
|
||||||
end
|
end
|
||||||
@@ -509,7 +517,7 @@ function drawUpdatedText(x, y, label, value, color, labelColor)
|
|||||||
local key = label
|
local key = label
|
||||||
if lastValues[key] ~= value then
|
if lastValues[key] ~= value then
|
||||||
labelColor = labelColor or colors.white
|
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)
|
f.draw_text_lr(mon, x, y, 3, label, value, labelColor, color, colors.black)
|
||||||
lastValues[key] = value
|
lastValues[key] = value
|
||||||
end
|
end
|
||||||
|
|||||||
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
local libURL = "https://raw.githubusercontent.com/StormFusions/Draconic-ComputerCraft-Program/main/lib/f.lua"
|
local libURL = "https://git.ipost.rocks/code002lover/Draconic-ComputerCraft-Program/raw/branch/main/lib/f.lua"
|
||||||
local libURL2 = "https://raw.githubusercontent.com/StormFusions/Draconic-ComputerCraft-Program/main/lib/button.lua"
|
local libURL2 = "https://git.ipost.rocks/code002lover/Draconic-ComputerCraft-Program/raw/branch/main/lib/button.lua"
|
||||||
local startupURL = "https://raw.githubusercontent.com/StormFusions/Draconic-ComputerCraft-Program/main/reactor.lua"
|
local startupURL = "https://git.ipost.rocks/code002lover/Draconic-ComputerCraft-Program/raw/branch/main/reactor.lua"
|
||||||
local lib, lib2, startup
|
local lib, lib2, startup
|
||||||
local libFile, lib2File, startupFile
|
local libFile, lib2File, startupFile
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user