Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mod = peripheral.find("modem")
- mon = peripheral.find("monitor")
- function infoRequest(info)
- modem.transmit(5,5, info)
- event, side, chRec, chSend, recInfo, dist = os.pullEvent("modem_message")
- return recInfo
- end
- function getReactorStats()
- rfTotal = infoRequest("rftotal")
- rfTick = infoRequest("rftick")
- fuelConsumed = infoRequest("consumed")
- rodLevel = = infoRequest("rodlevel")
- end
- function sendReactor(com)
- modem.transmit(5,5, com)
- end
- function createwindows()
- rfWin = window.create(mon, 2, 2, 5, 3, true)
- rfWin.setBackgroundColor(colors.red)
- rfWin.clear()
- end
- function writeRftotal()
- createwindows()
- rfW, rfH = rfWin.getSize()
- info = "Total rf: "..rfTotal
- rfWin.setCursorPos(rfW/2 - #info ,rfH/2)
- mon.write(info)
- end
- getReactorStats()
- writeRftotal()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement