Advertisement
Tim3Game

BigReactors Reactor Screen

Jan 11th, 2015
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.86 KB | None | 0 0
  1. --[[
  2.   BigReactors Screen - by Tim3Game
  3.   WARNING: All is in Slovak
  4.   ODPORUCANE:
  5.   Advanced Monitor + Advanced Computer
  6.   Editovat peripherali
  7. --]]
  8. while true do
  9.   reactor = peripheral.wrap("BigReactors-Reactor_1")
  10.   mon = peripheral.wrap("monitor_1")
  11.   chat = peripheral.wrap("bottom")
  12.   maxfuel = "10"
  13.   rednetID = 1
  14.   mon.clear()
  15.  
  16.   -- Funkcnost
  17.   mon.setCursorPos(5,1)
  18.   if reactor.getActive()==true then
  19.     mon.setTextColor(colors.green)
  20.     mon.write("ON")
  21.   else
  22.     mon.setTextColor(colors.red)
  23.     mon.write("OFF")
  24.   end
  25.  
  26.   -- Produkcia
  27.   mon.setCursorPos(1,2)
  28.   mon.setTextColor(colors.white)
  29.   mon.write("RF/t: ")
  30.   mon.setCursorPos(5,2)
  31.   mon.setTextColor(colors.lime)
  32.   mon.write(reactor.getEnergyProducedLastTick)
  33.  
  34.   -- Obsah
  35.   mon.setCursorPos(1,3)
  36.   mon.setTextColor(colors.white)
  37.   mon.write("Obsah: ")
  38.   mon.setCursorPos(5,3)
  39.   mon.setTextColor(colors.lime)
  40.   mon.write(reactor.getEnergyStored)
  41.  
  42.   -- Spotreba
  43.   mon.setCursorPos(1,4)
  44.   mon.setTextColor(colors.white)
  45.   mon.write("Spotreba: ")
  46.   mon.setCursorPos(5,4)
  47.   mon.setTextColor(colors.lime)
  48.   mon.write(reactor.getFuelConsumedLastTick)
  49.  
  50. -- TEPLOTY
  51.   mon.setCursorPos(1,5)
  52.   mon.setTextColor(colors.red)
  53.   mon.write("TEPLOTY")
  54.   -- Teplota obalu
  55.   mon.setCursorPos(1,6)
  56.   mon.setTextColor(colors.white)
  57.   mon.write("Obal: ")
  58.   mon.setCursorPos(5,6)
  59.   mon.setTextColor(colors.lime)
  60.   mon.write(reactor.getCasingTemperature)
  61.   -- Teplota Jadra
  62.   mon.setCursorPos(1,7)
  63.   mon.setTextColor(colors.white)
  64.   mon.write("Jadro: ")
  65.   mon.setCursorPos(5,7)
  66.   mon.setTextColor(colors.lime)
  67.   mon.write(reactor.getFuelTemperature)
  68.  
  69. -- AUTOMATICKE VYPNUTIE PRI VELKEJ SPOTREBE PALIVA
  70.  
  71.   --if reactor.getFuelConsumedLastTick > maxfuel then
  72.   --  reactor.setActive(false)
  73.   --    rednet.send(rednetID, Reaktor bol vypnuti kvoli vysokej spotrebe paliva)
  74.   --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement