Files
nova-corp/turbine_driver.lua
2025-06-14 14:49:12 -04:00

25 lines
657 B
Lua

local function getValue(reactor)
return reactor.getStatus() or false
end
local function color(reactor)
local value = getValue(reactor)
return colors.black
end
local function watch(reactor, monitor)
local value = getValue(reactor)
print("Status: " .. tostring(value))
isWarningState = true
sleep(5)
isWarningState = false
end
local function report(reactor, monitor)
local value = getValue(reactor)
local color = color(reactor)
monitor.setBackgroundColor(color)
monitor.clearLine()
monitor.write("Reactor Status: " .. tostring(value))
end
return { report = report, watch = watch }