This commit is contained in:
2025-06-14 14:59:02 -04:00
parent c7f5b9d860
commit b4dc738f05
2 changed files with 23 additions and 12 deletions

View File

@@ -1,20 +1,20 @@
local function getValue(reactor)
return reactor.getSteamFilledPercentage() * 100
local function getValue(target)
return target.getSteamFilledPercentage() * 100
end
local function color(reactor)
local value = getValue(reactor)
local function color(target)
local value = getValue(target)
return colors.black
end
local function watch(reactor, monitor)
print("Turbine Steam Filled: " .. getValue(reactor))
local function watch(target, monitor)
print("Turbine Steam Filled: " .. getValue(target))
end
local function report(reactor, monitor)
local color = color(reactor)
local function report(target, monitor)
local color = color(target)
monitor.setBackgroundColor(color)
monitor.clearLine()
monitor.write("Turbine Steam Filled: " .. getValue(reactor) .. "%")
monitor.write("Turbine Steam Filled: " .. getValue(target) .. "%")
end
return { report = report, watch = watch }