updated
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
local function report(reactor)
|
||||
if reactor then
|
||||
return reactor.getCoolantFilledPercentage()
|
||||
return (reactor.getCoolantFilledPercentage() or 0) * 100
|
||||
else
|
||||
return "No reactor found"
|
||||
end
|
||||
end
|
||||
|
||||
local function watch(reactor, monitor)
|
||||
local coolantLevel =
|
||||
print("Coolant: " .. report(reactor))
|
||||
sleep(1)
|
||||
end
|
||||
|
||||
3
main.lua
3
main.lua
@@ -8,7 +8,6 @@ local function runMonitors()
|
||||
while true do
|
||||
tempDriver.watch(reactor, monitor)
|
||||
coolantDriver.watch(reactor, monitor)
|
||||
sleep(1)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -26,8 +25,6 @@ local function runDisplay()
|
||||
monitor.write(item.Label .. ": " .. item.value)
|
||||
monitor.setCursorPos(1, i + 1)
|
||||
end
|
||||
|
||||
sleep(1)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user