SHOW:
|
|
- or go back to the newest paste.
| 1 | local mon = peripheral.wrap("right")
| |
| 2 | rednet.open("top")
| |
| 3 | mon.clear() | |
| 4 | ||
| 5 | ||
| 6 | mon.setCursorPos(1,1) | |
| 7 | mon.setTextColor(colors.blue) | |
| 8 | - | mon.setTextScale(2) |
| 8 | + | monitor.setTextScale(2) |
| 9 | - | mon.write("Reactor")
|
| 9 | + | mon.write("Energy storage")
|
| 10 | ||
| 11 | while true do | |
| 12 | -- Reactor | |
| 13 | id, msg = rednet.receive() | |
| 14 | table = textutils.unserialize(msg) | |
| 15 | ||
| 16 | energy = table[1] | |
| 17 | - | fuel = table[2] |
| 17 | + | maxenergy = table[2] |
| 18 | - | maxfuel = table[3] |
| 18 | + | |
| 19 | - | active = table[4] |
| 19 | + | |
| 20 | mon.setCursorPos(1,3) | |
| 21 | - | -- Status |
| 21 | + | |
| 22 | - | mon.setCursorPos(1,3) |
| 22 | + | |
| 23 | - | mon.setTextColor(colors.green) |
| 23 | + | |
| 24 | - | mon.write("Status: ")
|
| 24 | + | |
| 25 | mon.write(maxenergy) | |
| 26 | - | if active == true then |
| 26 | + | |
| 27 | - | mon.write("Online")
|
| 27 | + | |
| 28 | - | else |
| 28 | + |