15 lines
338 B
Lua
15 lines
338 B
Lua
local function report(reactor)
|
|
if reactor then
|
|
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
|
|
|
|
return { report = report, watch = watch } |