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,22 +1,22 @@
local function getValue(reactor)
local function getValue()
return reactor.getStatus() or false
end
local function color(reactor)
local value = getValue(reactor)
local function color()
local value = getValue()
return colors.black
end
local function watch(reactor, monitor)
local value = getValue(reactor)
local function watch()
local value = getValue()
print("Status: " .. tostring(value))
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("Reactor Status: " .. tostring(value))