This commit is contained in:
2025-06-14 14:53:17 -04:00
parent 64a32b6783
commit c7f5b9d860

View File

@@ -1,5 +1,5 @@
local function getValue(reactor)
return reactor.getStatus() or false
return reactor.getSteamFilledPercentage() * 100
end
local function color(reactor)
@@ -8,19 +8,13 @@ local function color(reactor)
end
local function watch(reactor, monitor)
local value = getValue(reactor)
print("Status: " .. tostring(value))
monitor.clear()
isWarningState = true
sleep(5)
isWarningState = false
print("Turbine Steam Filled: " .. getValue(reactor))
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))
monitor.write("Turbine Steam Filled: " .. getValue(reactor) .. "%")
end
return { report = report, watch = watch }