SHOW:
|
|
- or go back to the newest paste.
| 1 | while true do | |
| 2 | local reactor1 = peripheral.wrap("BigReactors-Reactor_1")
| |
| 3 | - | local mon = peripheral.wrap("top")
|
| 3 | + | local mon = peripheral.wrap("back")
|
| 4 | mon.clear() | |
| 5 | ||
| 6 | --Color reset | |
| 7 | mon.setBackgroundColor(colors.black) | |
| 8 | mon.setTextColor(colors.white) | |
| 9 | mon.setTextScale(1) | |
| 10 | ||
| 11 | --Peripheral check | |
| 12 | if(reactor1==nil)then | |
| 13 | mon.setCursorPos(1,1) | |
| 14 | mon.setTextColor(colors.red) | |
| 15 | mon.write("Reactor is missing")
| |
| 16 | mon.setCursorPos(1,2) | |
| 17 | if(peripheral.getType("bottom")=="modem") then
| |
| 18 | mon.setTextColor(colors.lime) | |
| 19 | mon.write("Modem connected")
| |
| 20 | else | |
| 21 | mon.write("Modem not connected")
| |
| 22 | end | |
| 23 | mon.setTextColor(colors.white) | |
| 24 | mon.setBackgroundColor(colors.black) | |
| 25 | mon.setTextScale(1) | |
| 26 | return | |
| 27 | end | |
| 28 | ||
| 29 | --Active status | |
| 30 | mon.setCursorPos(1,1) | |
| 31 | mon.setTextColor(colors.white) | |
| 32 | mon.write("Active: ")
| |
| 33 | mon.setTextColor(colors.lime) | |
| 34 | mon.write(reactor1.getActive()) | |
| 35 | ||
| 36 | --RF Redstoneflux per tick | |
| 37 | mon.setCursorPos(1,2) | |
| 38 | mon.setTextColor(colors.white) | |
| 39 | mon.write("RF/T: ")
| |
| 40 | mon.setTextColor(colors.lime) | |
| 41 | mon.write(math.floor(reactor1.getEnergyProducedLastTick())) | |
| 42 | ||
| 43 | --Control rod amount | |
| 44 | mon.setCursorPos(1,3) | |
| 45 | mon.setTextColor(colors.white) | |
| 46 | mon.write("Control Rods: ")
| |
| 47 | mon.setTextColor(colors.lime) | |
| 48 | mon.write(math.floor(reactor1.getNumberOfControlRods())) | |
| 49 | ||
| 50 | --RedStoneflux amount stored | |
| 51 | mon.setCursorPos(1,4) | |
| 52 | mon.setTextColor(colors.white) | |
| 53 | mon.write("RF Stored: ")
| |
| 54 | mon.setTextColor(colors.lime) | |
| 55 | mon.write(math.floor(reactor1.getEnergyStored())) | |
| 56 | ||
| 57 | --Casing Temprature | |
| 58 | mon.setCursorPos(1,5) | |
| 59 | mon.setTextColor(colors.white) | |
| 60 | mon.write("Casing Heat: ")
| |
| 61 | mon.setTextColor(colors.lime) | |
| 62 | mon.write(math.floor(reactor1.getCasingTemperature())) | |
| 63 | ||
| 64 | --Fuel Temprature | |
| 65 | mon.setCursorPos(1,6) | |
| 66 | mon.setTextColor(colors.white) | |
| 67 | mon.write("Fuel Heat: ")
| |
| 68 | mon.setTextColor(colors.lime) | |
| 69 | mon.write(math.floor(reactor1.getFuelTemperature())) | |
| 70 | ||
| 71 | --Paint buttons | |
| 72 | mon.setTextColor(colors.black) | |
| 73 | mon.setBackgroundColor(colors.lime) | |
| 74 | mon.setCursorPos(1,10) | |
| 75 | mon.clearLine() | |
| 76 | mon.setCursorPos(4,11) | |
| 77 | mon.clearLine() | |
| 78 | mon.write("ON")
| |
| 79 | mon.setCursorPos(1,12) | |
| 80 | mon.clearLine() | |
| 81 | mon.setBackgroundColor(colors.red) | |
| 82 | mon.setCursorPos(10,10) | |
| 83 | mon.write(" ")
| |
| 84 | mon.setCursorPos(10,11) | |
| 85 | mon.write(" OFF ")
| |
| 86 | mon.setCursorPos(10,12) | |
| 87 | mon.write(" ")
| |
| 88 | ||
| 89 | --Background rest | |
| 90 | mon.setBackgroundColor(colors.black) | |
| 91 | ||
| 92 | --Timer and touch eventlistener | |
| 93 | os.startTimer(1) | |
| 94 | event,side,x,y = os.pullEvent() | |
| 95 | if event == "monitor_touch" and y>=10 then | |
| 96 | if x <= 10 then | |
| 97 | reactor1.setActive(true) | |
| 98 | elseif x >10 then | |
| 99 | reactor1.setActive(false) | |
| 100 | -- End Reactor 1 | |
| 101 | end | |
| 102 | end | |
| 103 | end |