Advertisement
Guest User

startup

a guest
Jan 17th, 2020
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.50 KB | None | 0 0
  1. while true do
  2.   local reactor1 = peripheral.wrap("BigReactors-Reactor_0")
  3.   local mon = peripheral.wrap("back")
  4.   mon.clear()
  5.  
  6.  
  7.  mon.setCursorPos(1,6)
  8.  mon.write("Reactor")
  9.  even,side,x,y = os.pullEvent("monitor_touch")
  10.  
  11.  if x > 1 and x < 10 and y == 6 and reactor1.getActive() == false then
  12.         reactor1.setActive(true)
  13.         mon.setCursorPos(1,6)
  14.         mon.clearLine()
  15.         mon.blit("Reactor","0000000","ddddddd")
  16.        
  17.         elseif x > 1 and x < 10 and y == 6 and reactor1.getActive() == true then
  18.        
  19.         reactor1.setActive(false)
  20.         mon.setCursorPos(1,6)
  21.         mon.clearLine()
  22.         mon.blit("Reactor","0000000","eeeeeee")
  23.         end
  24.        
  25.   mon.setCursorPos(1,1)
  26.   mon.setTextColor(colors.white)
  27.   mon.write("Active: ")
  28.   mon.setTextColor(colors.lime)
  29.   mon.write(reactor1.getActive())
  30.    
  31.   mon.setCursorPos(1,2)
  32.   mon.setTextColor(colors.white)
  33.   mon.write("RF/T: ")  
  34.   mon.setTextColor(colors.lime)
  35.   mon.write(math.floor(reactor1.getEnergyProducedLastTick()))
  36.  
  37.   mon.setCursorPos(1,3)
  38.   mon.setTextColor(colors.white)
  39.   mon.write("RF Stored: ")
  40.   mon.setTextColor(colors.lime)
  41.   mon.write(math.floor(reactor1.getEnergyStored()))
  42.  
  43.   mon.setCursorPos(1,4)
  44.   mon.setTextColor(colors.white)
  45.   mon.write("Casing Heat: ")
  46.   mon.setTextColor(colors.lime)
  47.   mon.write(math.floor(reactor1.getCasingTemperature()))
  48.  
  49.   mon.setCursorPos(1,5)
  50.   mon.setTextColor(colors.white)
  51.   mon.write("Fuel Heat: ")
  52.   mon.setTextColor(colors.lime)
  53.   mon.write(math.floor(reactor1.getFuelTemperature()))
  54.  
  55.  
  56.  
  57.  
  58.    sleep(1)
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement