updated
This commit is contained in:
@@ -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 }
|
||||
Reference in New Issue
Block a user