SHOW:
|
|
- or go back to the newest paste.
| 1 | local turbine1 | |
| 2 | local reactor1 | |
| 3 | local monitor | |
| 4 | ||
| 5 | monitor = peripheral.wrap("right")
| |
| 6 | ||
| 7 | while true do | |
| 8 | rednet.open("back")
| |
| 9 | - | message = rednet.receive() |
| 9 | + | id,message = rednet.receive() |
| 10 | - | bank = message["bank"] |
| 10 | + | |
| 11 | - | if bank == 1 |
| 11 | + | if id == 2 then |
| 12 | monitor.write('Reactor - Turbine Monitoring')
| |
| 13 | term.setCursorPos(1,2) | |
| 14 | monitor.write('Data Broadcast Received')
| |
| 15 | term.setCursorPos(1,3) | |
| 16 | monitor.write('System Status')
| |
| 17 | term.setCursorPos(1,4) | |
| 18 | monitor.write('Turbine:')
| |
| 19 | term.setCursorPos(1,5) | |
| 20 | monitor.write('RPM: '..message["turbine1rpm"]..'')
| |
| 21 | term.setCursorPos(1,6) | |
| 22 | monitor.write('Flow Rate: '..message["turbine1Flow"]..'mb/t')
| |
| 23 | term.setCursorPos(1,7) | |
| 24 | monitor.write('Generation: '..message["turbine1RFT"]..' rf/t')
| |
| 25 | term.setCursorPos(1,8) | |
| 26 | monitor.write('Capacitor: '..message["turbine1capacitor"]..'')
| |
| 27 | term.setCursorPos(1,10) | |
| 28 | monitor.write('Reactor:')
| |
| 29 | term.setCursorPos(1,11) | |
| 30 | monitor.write('Temp: '..message["reactor1Temp"]..'')
| |
| 31 | term.setCursorPos(1,12) | |
| 32 | monitor.write('Steam Pressure: '..message["reactor1Steam"]..'')
| |
| 33 | term.setCursorPos(1,13) | |
| 34 | monitor.write('Fuel Consumption: '..message["reactor1Fuel"]..'')
| |
| 35 | end | |
| 36 | end |