diff --git a/temperature_monitor.lua b/temperature_monitor.lua index 197506c..5e42d45 100644 --- a/temperature_monitor.lua +++ b/temperature_monitor.lua @@ -1,12 +1,11 @@ local function report() - local peripherals = peripheral.getNames() - for i, name in ipairs(peripherals) do - print("Peripheral " .. i .. ": " .. name) + local reactor = peripheral.find("fissionReactorLogicAdapter") + if reactor then + return reactor.getTemperature() + else + return "No reactor found" end - return "abc" - -- local reactor = peripheral.find("fissionReactorLogicAdapter") - -- return reactor.getTemerature() end return { report = report } \ No newline at end of file