updated
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
local function report()
|
||||
local reactor = peripheral.find("fissionReactorLogicAdapter")
|
||||
local function report(reactor)
|
||||
if reactor then
|
||||
return reactor.getTemperature()
|
||||
return reactor.getCoolantFilledPercentage()
|
||||
else
|
||||
return "No reactor found"
|
||||
end
|
||||
end
|
||||
|
||||
return { report = report }
|
||||
local function watch(reactor, monitor)
|
||||
while true do
|
||||
print("Coolant: " .. report(reactor))
|
||||
sleep(1)
|
||||
end
|
||||
end
|
||||
|
||||
return { report = report, watch = watch }
|
||||
Reference in New Issue
Block a user