This commit is contained in:
2025-06-14 15:22:05 -04:00
parent 5ca8c6d222
commit 495de6bf3e
5 changed files with 45 additions and 48 deletions

View File

@@ -1,31 +1,25 @@
local maxValue = 100
local minValue = 0
local function getValue(reactor)
local function getValue()
return (reactor.getCoolantFilledPercentage() or 0) * 100
end
local function configureReport(monitor)
local x,y = monitor.getCursorPos()
monitor.setCursorPos(x, y + 1)
monitor.clearLine()
end
local function color(reactor)
local coolantLevel = getValue(reactor)
local function color()
local coolantLevel = getValue()
return colors.black
end
local function watch(reactor, monitor)
local coolantLevel = getValue(reactor)
local function watch()
local coolantLevel = getValue()
print("Coolant: " .. coolantLevel)
sleep(1)
end
local function report(reactor, monitor)
local value = getValue(reactor)
local color = color(reactor)
local function report()
local value = getValue()
local color = color()
monitor.setBackgroundColor(color)
monitor.clearLine()
monitor.write("Coolant: " .. value .. "%")