Advertisement
Guest User

startup

a guest
Apr 26th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.65 KB | None | 0 0
  1. reactor = peripheral.wrap("BigReactors-Reactor_0")
  2. mon = peripheral.wrap("monitor_9")
  3.  
  4.  
  5. mon.clear()
  6. while true do
  7. mon.setBackgroundColor(colors.black)
  8.  
  9. coretemp = reactor.getFuelTemperature()
  10. casetemp = reactor.getCasingTemperature()
  11. rf = reactor.getEnergyProducedLastTick()
  12. stored = reactor.getEnergyStored()
  13.  
  14.   sleep(0)
  15.  
  16.   -- Euberschreift
  17.   mon.setCursorPos(1,1)
  18.   mon.setBackgroundColor(colors.lime)
  19.   mon.setTextColor(colors.blue)
  20.   mon.write("Reaktor: <Zum Travohaeuschen>")
  21.   mon.setBackgroundColor(colors.black)
  22.   --
  23.  
  24.   -- Status
  25.  
  26.   mon.setCursorPos(2,3)
  27.   mon.setTextColor(colors.yellow)
  28.   mon.write("Status:")
  29.  
  30.   --
  31.  
  32.   if reactor.getActive()==true then
  33.     mon.clearLine()
  34.     mon.setCursorPos(2,3)  
  35.     mon.setTextColor(colors.yellow)
  36.     mon.write("Status:")
  37.     mon.setCursorPos(18,3)
  38.     mon.setTextColor(colors.lime)
  39.     mon.write("Online")
  40.   end
  41.    
  42.   if reactor.getActive()== false then
  43.     mon.clearLine()
  44.     mon.setCursorPos(2,3)
  45.     mon.setTextColor(colors.yellow)
  46.     mon.write("  Status:")
  47.     mon.setCursorPos(18,3)
  48.     mon.setTextColor(colors.red)
  49.     mon.write("Offline")
  50.    
  51.   end
  52.    
  53.   --   Rf/Tick
  54.  
  55.   mon.setCursorPos(2,5)
  56.   mon.setTextColor(colors.yellow)
  57.   mon.write(" Energie:")
  58.  
  59.  
  60.   mon.setCursorPos(18,5)
  61.   mon.setTextColor(colors.red)
  62.   rfrund = (math.floor(rf))
  63.   mon.write(rfrund)
  64.  
  65.  
  66.   -- Core Temp
  67.  
  68.   corerund = (math.floor(coretemp))
  69.  
  70.     mon.setCursorPos(2,7)
  71.     mon.setTextColor(colors.yellow)
  72.     mon.write("Coretemp:")
  73.    
  74.    
  75.  
  76.  
  77.     mon.setCursorPos(18,7)
  78.     mon.setTextColor(colors.green)
  79.     mon.write(corerund)
  80.    
  81.    
  82.  
  83.  
  84.   --CaseTemp
  85.  
  86.   mon.setCursorPos(2,9)
  87.   mon.setTextColor(colors.yellow)
  88.   mon.write("CaseTemp:")
  89.   caserund = (math.floor(casetemp))
  90.  
  91.   mon.setCursorPos(18,9)
  92.   mon.setTextColor(colors.green)
  93.   mon.write(caserund)
  94.  
  95.  
  96.  
  97.  
  98.    
  99.    
  100.    
  101.  
  102.  
  103.  
  104.   --
  105.  
  106.  
  107.  
  108.   -- EnergyBuffer
  109.  
  110.   mon.setCursorPos(5,11)
  111.   mon.setTextColor(colors.yellow)
  112.   mon.write("Gesp.:")
  113.  
  114.   mon.setCursorPos(18,11)
  115.   mon.setTextColor(colors.red)
  116.   nrg= (math.floor(100 * stored / 10000000))
  117.   mon.setTextColor(colors.green)
  118.   mon.write(nrg)
  119.    
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.   mon.setTextColor(colors.yellow)
  127.   mon.setCursorPos(25,5)
  128.   mon.write("Rf/t")
  129.   mon.setCursorPos(25,7)
  130.   mon.write("Grad C.")
  131.   mon.setCursorPos(25,9)
  132.   mon.write("Grad C.")
  133.   mon.setCursorPos(25,11)
  134.   mon.write("%")
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.   if reactor.getEnergyStored() < 2000000 then
  144.   reactor.setActive (true)
  145.   end
  146.  
  147.   if reactor.getEnergyStored() > 8000000 then
  148.   reactor.setActive (false)
  149.   end
  150. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement