Files
nova-corp/coolant_driver.lua
2025-06-14 18:13:19 -04:00

33 lines
647 B
Lua

local maxValue = 100
local minValue = 0
local function getValue()
return (reactor.getCoolantFilledPercentage() or 0) * 100
end
local function checkCoolantLevel()
local coolantLevel = getValue()
return true
end
local function watch()
while true do
checkCoolantLevel()
sleep(0.05)
end
end
-- local function watch()
-- checkCoolantLevel()
-- end
local function report()
local value = getValue()
local color = colors.black
monitor.setBackgroundColor(color)
monitor.clearLine()
monitor.write("Coolant: " .. value .. "%")
end
return { report = report, watch = watch}