20 lines
555 B
Lua
20 lines
555 B
Lua
local function getValue(reactor)
|
|
return reactor.getSteamFilledPercentage() * 100
|
|
end
|
|
|
|
local function color(reactor)
|
|
local value = getValue(reactor)
|
|
return colors.black
|
|
end
|
|
|
|
local function watch(reactor, monitor)
|
|
print("Turbine Steam Filled: " .. getValue(reactor))
|
|
end
|
|
|
|
local function report(reactor, monitor)
|
|
local color = color(reactor)
|
|
monitor.setBackgroundColor(color)
|
|
monitor.clearLine()
|
|
monitor.write("Turbine Steam Filled: " .. getValue(reactor) .. "%")
|
|
end
|
|
return { report = report, watch = watch } |