View difference between Paste ID: NX7E27EH and Gtmt47jF
SHOW: | | - or go back to the newest paste.
1
mon = peripheral.wrap("monitor_0")
2
pr = peripheral.wrap("back")
3
mon.setTextColor(colors.white)
4
5
if pr.getConnected() == false then
6
  term.clear()
7
  term.setCursorPos(8,5)
8
  print("Sorry but this computer couldn")
9
  term.setCursorPos(8,6)
10
  print("connect to the reactor.")
11
else
12
13-
  term.setCursorPos(10,7)
13+
14
  term.clear()
15
  mon.clear()
16
  term.setCursorPos(1,1)
17
  mon.setCursorPos(1,1)
18
   if pr.getActive() == true then
19
     onoff = "ON"
20
   else
21
     onoff = "OFF"
22
   end
23-
  term.setCursorPos(10,8)
23+
24
  print("Reactor Status: "..onoff)
25
  mon.write("Reactor Status: "..onoff)
26-
   if st <= 5000000 then
26+
27
  
28
  term.setCursorPos(14,10)
29
  mon.setCursorPos(10,9)
30
  print("RF Stored: ".. st)
31
  mon.write("RF Stored: "..st)
32
  
33-
  term.setCursorPos(10,9)
33+
   if st <= 1000000 then
34
     pr.setActive(true)
35
   elseif st >= 9950000 then
36
     pr.setActive(false)
37-
  term.setCursorPos(10,10)
37+
38
  
39
  tc = pr.getCasingTemperature()
40
  term.setCursorPos(25,1)
41-
  term.setCursorPos(10,11)
41+
  mon.setCursorPos(1,4)
42-
  print("Generating ".. gr .." RF/Tick")
42+
43
  mon.write("Casing Temp: "..tc)
44
  
45
  tf = pr.getFuelTemperature()
46
  term.setCursorPos(25,2)
47
  mon.setCursorPos(1,5)
48
  print("Fuel Temp: ".. tf)
49
  mon.write("Fuel Temp: "..tf)
50
  
51
  fa = pr.getFuelAmount()
52
  fm = pr.getFuelAmountMax()
53
  term.setCursorPos(1,2)
54
  mon.setCursorPos(1,2)
55
  print("Fuel lvl: ".. fa .."/".. fm)
56
  mon.write("Fuel lvl: "..fa.."/"..fm)
57
  gr = pr.getEnergyProducedLastTick()
58
   if gr == 0 then
59
   else
60
    term.setCursorPos(10,13)
61
    mon.setCursorPos(6,11)
62
    print("Generating ".. gr .." RF/Tick")
63
    mon.write("Generating "..gr.." RF/TICK")
64
   end
65
66
  ra = pr.getFuelReactivity()
67
  term.setCursorPos(25,3)
68
  print("Reactive Lvl: ".. ra .."%")  
69
  mon.setCursorPos(1,6)
70
  mon.write("Reactive Lvl: ".. ra .."%")
71
  sleep(1)
72
end
73
end