Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local aMon = peripheral.wrap("top")
- local reac = peripheral.wrap("BigReactors-Reactor_0")
- aMon.clear()
- aMon.setCursorPos(1, 1)
- function round(num)
- return math.floor(num + 0.5)
- end
- function printActive()
- -- Check if the reactor is active
- aMon.write("Active............ ")
- if reac.getActive() then
- aMon.setTextColor(colors.lime)
- aMon.write("Yes")
- else
- aMon.setTextColor(colors.red)
- aMon.write("No")
- end
- aMon.setTextColor(colors.white)
- end
- function printFuelTemp()
- aMon.write("Fuel Temperature.. ")
- temp = reac.getFuelTemperature()
- if temp > 250 and temp < 500 then
- aMon.setTextColor(colors.cyan)
- elseif temp < 1000 then
- aMon.setTextColor(colors.lime)
- elseif temp < 1500 then
- aMon.setTextColor(colors.yellow)
- elseif temp < 1900 then
- aMon.setTextColor(colors.orange)
- else
- aMon.setTextColor(colors.red)
- end
- aMon.write(tostring(round(temp)))
- aMon.setTextColor(colors.white)
- aMon.write(" / 2000C)")
- end
- printActive()
- aMon.setCursorPos(1, 2)
- printFuelTemp()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement