updated
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
local function getValue(reactor)
|
local function getValue(reactor)
|
||||||
return reactor.getStatus() or false
|
return reactor.getSteamFilledPercentage() * 100
|
||||||
end
|
end
|
||||||
|
|
||||||
local function color(reactor)
|
local function color(reactor)
|
||||||
@@ -8,19 +8,13 @@ local function color(reactor)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function watch(reactor, monitor)
|
local function watch(reactor, monitor)
|
||||||
local value = getValue(reactor)
|
print("Turbine Steam Filled: " .. getValue(reactor))
|
||||||
print("Status: " .. tostring(value))
|
|
||||||
monitor.clear()
|
|
||||||
isWarningState = true
|
|
||||||
sleep(5)
|
|
||||||
isWarningState = false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function report(reactor, monitor)
|
local function report(reactor, monitor)
|
||||||
local value = getValue(reactor)
|
|
||||||
local color = color(reactor)
|
local color = color(reactor)
|
||||||
monitor.setBackgroundColor(color)
|
monitor.setBackgroundColor(color)
|
||||||
monitor.clearLine()
|
monitor.clearLine()
|
||||||
monitor.write("Reactor Status: " .. tostring(value))
|
monitor.write("Turbine Steam Filled: " .. getValue(reactor) .. "%")
|
||||||
end
|
end
|
||||||
return { report = report, watch = watch }
|
return { report = report, watch = watch }
|
||||||
Reference in New Issue
Block a user