Advertisement
rejnock

Untitled

Nov 28th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local reactor = peripheral.wrap("back")
  2. local monitor = peripheral.wrap("top")
  3. print("startuji rizeni reaktoru")
  4. monitor.clear()
  5. monitor.setTextScale(0.8)
  6.  
  7. while true do
  8. zasoba=(reactor.getEnergyStored())
  9. vykon=math.floor(reactor.getEnergyProducedLastTick()+0.5 )
  10. teplota=math.floor((reactor.getCasingTemperature()) )
  11. spotreba=(reactor.getFuelConsumedLastTick())
  12.  
  13. if reactor.getActive() == true then
  14.  stav=("reaktor v provozu")
  15. end
  16. if reactor.getActive() == false then
  17.  stav=("reaktor mimo provoz")
  18. end
  19. monitor.setCursorPos(1,2)
  20. monitor.write ("Buffer reaktoru :")
  21. monitor.setCursorPos(18,2)
  22. monitor.write (zasoba.." RF")
  23. monitor.setCursorPos(1,3)
  24. monitor.write ("vykon reaktoru  :")
  25. monitor.setCursorPos(18,3)
  26. monitor.write (vykon.." RF/t")
  27. monitor.setCursorPos(1,4)
  28. monitor.write ("teplota plaste  :")
  29. monitor.setCursorPos(18,4)
  30. monitor.write (teplota.." C")
  31.  
  32. monitor.setCursorPos(1,5)
  33. monitor.write ("Spotreba paliva :")
  34. monitor.setCursorPos(18,5)
  35. math.floor(spotreba +.5)
  36. monitor.write (spotreba.." mB/t")
  37. monitor.setCursorPos(1,10)
  38. monitor.write (stav)
  39.  
  40. if reactor.getEnergyStored() < 5000000 then
  41. reactor.setAllControlRodLevels (10)
  42. end
  43.  
  44. if reactor.getEnergyStored() > 7000000 then
  45. reactor.setAllControlRodLevels (96)
  46. end
  47.  
  48. sleep (2)
  49. monitor.clear()
  50. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement