Files
nova-corp/turbine_driver.lua
2025-06-14 14:48:16 -04:00

24 lines
630 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))
sleep(5)
isWarningState = true
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 }