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