Advertisement
MrSliff

Reaktor

Apr 29th, 2021 (edited)
672
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 19.61 KB | None | 0 0
  1. local monitor = peripheral.wrap("monitor_1")
  2. local capacitor = peripheral.wrap("tile_blockcapacitorbank_name_2")
  3. local reactor = peripheral.wrap("BigReactors-Reactor_0")
  4. local turbine_1 = peripheral.wrap("BigReactors-Turbine_17")
  5. local turbine_2 = peripheral.wrap("BigReactors-Turbine_13")
  6. local turbine_3 = peripheral.wrap("BigReactors-Turbine_2")
  7. local turbine_4 = peripheral.wrap("BigReactors-Turbine_4")
  8. local turbine_5 = peripheral.wrap("BigReactors-Turbine_5")
  9. local turbine_6 = peripheral.wrap("BigReactors-Turbine_6")
  10. local turbine_7 = peripheral.wrap("BigReactors-Turbine_7")
  11. local turbine_8 = peripheral.wrap("BigReactors-Turbine_8")
  12. local turbine_9 = peripheral.wrap("BigReactors-Turbine_9")
  13. local turbine_10 = peripheral.wrap("BigReactors-Turbine_10")
  14. local turbine_11 = peripheral.wrap("BigReactors-Turbine_11")
  15. local turbine_12 = peripheral.wrap("BigReactors-Turbine_12")
  16. local turbine_13 = peripheral.wrap("BigReactors-Turbine_14")
  17. local turbine_14 = peripheral.wrap("BigReactors-Turbine_15")
  18. local turbine_15 = peripheral.wrap("BigReactors-Turbine_16")
  19. local turbine_16 = peripheral.wrap("BigReactors-Turbine_18")
  20. local turbine_17 = peripheral.wrap("BigReactors-Turbine_19")
  21. local turbine_18 = peripheral.wrap("BigReactors-Turbine_20")
  22.  
  23. monitor.setTextColor(1)
  24. monitor.setTextScale(2)
  25. monitor.setBackgroundColor(128)
  26. monitor.clear()
  27. local width, height = monitor.getSize()
  28. print("Monitor size: Columns:"..width..", Rows:"..height)
  29.  
  30. makePercent = 100
  31. capacitorCount = 720
  32. capacitorBasic = 1000000
  33. capacitorStandard = 5000000
  34. capacitorVibrant = 25000000
  35. totalCapacity = (capacitorCount) * (capacitorVibrant)
  36.  
  37. reactorRunning = false
  38. reactor.setActive(false)
  39. turbine_1.setActive(true)
  40. turbine_1.setInductorEngaged(false)
  41. turbine_2.setActive(true)
  42. turbine_2.setInductorEngaged(false)
  43. turbine_3.setActive(true)
  44. turbine_3.setInductorEngaged(false)
  45. turbine_4.setActive(true)
  46. turbine_4.setInductorEngaged(false)
  47. turbine_5.setActive(true)
  48. turbine_5.setInductorEngaged(false)
  49. turbine_6.setActive(true)
  50. turbine_6.setInductorEngaged(false)
  51. turbine_7.setActive(true)
  52. turbine_7.setInductorEngaged(false)
  53. turbine_8.setActive(true)
  54. turbine_8.setInductorEngaged(false)
  55. turbine_9.setActive(true)
  56. turbine_9.setInductorEngaged(false)
  57. turbine_10.setActive(true)
  58. turbine_10.setInductorEngaged(false)
  59. turbine_11.setActive(true)
  60. turbine_11.setInductorEngaged(false)
  61. turbine_12.setActive(true)
  62. turbine_12.setInductorEngaged(false)
  63. turbine_13.setActive(true)
  64. turbine_13.setInductorEngaged(false)
  65. turbine_14.setActive(true)
  66. turbine_14.setInductorEngaged(false)
  67. turbine_15.setActive(true)
  68. turbine_15.setInductorEngaged(false)
  69. turbine_16.setActive(true)
  70. turbine_16.setInductorEngaged(false)
  71. turbine_17.setActive(true)
  72. turbine_17.setInductorEngaged(false)
  73. turbine_18.setActive(true)
  74. turbine_18.setInductorEngaged(false)
  75.  
  76.  
  77.  
  78.  
  79. while true do
  80.   capacitorLevel = capacitor.getEnergyStored()
  81.   capacitorAdjusted = (capacitorLevel) * (capacitorCount)
  82.   capacitorFillPct = ((capacitorAdjusted) / (totalCapacity)) * (100)
  83.   capacitorInt = math.floor(capacitorFillPct)
  84.  
  85.   reactorCasingTemp = math.floor(reactor.getCasingTemperature())
  86.   reactorRodLevel = reactor.getControlRodLevel(1)
  87.  
  88.   turbineSpeed_1 = math.floor(turbine_1.getRotorSpeed())
  89.   turbineSpeed_2 = math.floor(turbine_2.getRotorSpeed())
  90.   turbineSpeed_3 = math.floor(turbine_3.getRotorSpeed())
  91.   turbineSpeed_4 = math.floor(turbine_4.getRotorSpeed())
  92.   turbineSpeed_5 = math.floor(turbine_5.getRotorSpeed())
  93.   turbineSpeed_6 = math.floor(turbine_6.getRotorSpeed())
  94.   turbineSpeed_7 = math.floor(turbine_7.getRotorSpeed())
  95.   turbineSpeed_8 = math.floor(turbine_8.getRotorSpeed())
  96.   turbineSpeed_9 = math.floor(turbine_9.getRotorSpeed())
  97.   turbineSpeed_10 = math.floor(turbine_10.getRotorSpeed())
  98.   turbineSpeed_11 = math.floor(turbine_11.getRotorSpeed())
  99.   turbineSpeed_12 = math.floor(turbine_12.getRotorSpeed())
  100.   turbineSpeed_13 = math.floor(turbine_13.getRotorSpeed())
  101.   turbineSpeed_14 = math.floor(turbine_14.getRotorSpeed())
  102.   turbineSpeed_15 = math.floor(turbine_15.getRotorSpeed())
  103.   turbineSpeed_16 = math.floor(turbine_16.getRotorSpeed())
  104.   turbineSpeed_17 = math.floor(turbine_17.getRotorSpeed())
  105.   turbineSpeed_18 = math.floor(turbine_18.getRotorSpeed())
  106.  
  107.   turbineSpeedMin = math.min(turbineSpeed_1, turbineSpeed_2, turbineSpeed_3, turbineSpeed_4, turbineSpeed_5, turbineSpeed_6, turbineSpeed_7, turbineSpeed_8, turbineSpeed_9, turbineSpeed_10, turbineSpeed_11, turbineSpeed_12, turbineSpeed_13, turbineSpeed_14, turbineSpeed_15, turbineSpeed_16, turbineSpeed_17, turbineSpeed_18)
  108.    
  109.    turbineSpeedMax = math.max(turbineSpeed_1, turbineSpeed_2, turbineSpeed_3, turbineSpeed_4, turbineSpeed_5, turbineSpeed_6, turbineSpeed_7, turbineSpeed_8, turbineSpeed_9, turbineSpeed_10, turbineSpeed_11, turbineSpeed_12, turbineSpeed_13, turbineSpeed_14, turbineSpeed_15, turbineSpeed_16, turbineSpeed_17, turbineSpeed_18)
  110.  
  111.   if (capacitorFillPct < 30) and (reactorRunning == false) then
  112.     reactorRunning = true
  113.   elseif (capacitorFillPct >=99) and (reactorRunning == true) then
  114.     reactorRunning = false
  115.   end
  116.  
  117.   if reactorRunning == true then
  118.     reactor.setActive(true)
  119.     if reactor.getActive() == false then
  120.       reactor.setActive(true)
  121.     end
  122.     if reactorCasingTemp < 1000 and (reactorRodLevel ~= 0) then
  123.       reactor.setAllControlRodLevels(0)
  124.     elseif (reactorCasingTemp >= 1000) and (reactorRodLevel ~= 30) then
  125.       reactor.setAllControlRodLevels(30)
  126.     end
  127.     if (reactorCasingTemp >= 1000) then
  128.       ----------------------------------------------------------------------------
  129.       if (turbineSpeed_1 < 1780) and (turbine_1.getFluidFlowRateMax() ~= 2000) then
  130.         turbine_1.setFluidFlowRateMax(2000)
  131.       end
  132.       if (turbineSpeed_2 < 1780) and (turbine_2.getFluidFlowRateMax() ~= 2000) then
  133.         turbine_2.setFluidFlowRateMax(2000)
  134.       end
  135.       if (turbineSpeed_3 < 1780) and (turbine_3.getFluidFlowRateMax() ~= 2000) then
  136.         turbine_3.setFluidFlowRateMax(2000)
  137.       end
  138.       if (turbineSpeed_4 < 1780) and (turbine_4.getFluidFlowRateMax() ~= 2000) then
  139.         turbine_4.setFluidFlowRateMax(2000)
  140.       end
  141.       if (turbineSpeed_5 < 1780) and (turbine_5.getFluidFlowRateMax() ~= 2000) then
  142.         turbine_5.setFluidFlowRateMax(2000)
  143.       end
  144.       if (turbineSpeed_6 < 1780) and (turbine_6.getFluidFlowRateMax() ~= 2000) then
  145.         turbine_6.setFluidFlowRateMax(2000)
  146.       end
  147.       if (turbineSpeed_7 < 1780) and (turbine_7.getFluidFlowRateMax() ~= 2000) then
  148.         turbine_7.setFluidFlowRateMax(2000)
  149.       end
  150.       if (turbineSpeed_8 < 1780) and (turbine_8.getFluidFlowRateMax() ~= 2000) then
  151.         turbine_8.setFluidFlowRateMax(2000)
  152.       end
  153.       if (turbineSpeed_9 < 1780) and (turbine_9.getFluidFlowRateMax() ~= 2000) then
  154.         turbine_9.setFluidFlowRateMax(2000)
  155.       end
  156.       if (turbineSpeed_10 < 1780) and (turbine_10.getFluidFlowRateMax() ~= 2000) then
  157.         turbine_10.setFluidFlowRateMax(2000)
  158.       end
  159.       if (turbineSpeed_11 < 1780) and (turbine_11.getFluidFlowRateMax() ~= 2000) then
  160.         turbine_11.setFluidFlowRateMax(2000)
  161.       end
  162.       if (turbineSpeed_12 < 1780) and (turbine_12.getFluidFlowRateMax() ~= 2000) then
  163.         turbine_12.setFluidFlowRateMax(2000)
  164.       end
  165.       if (turbineSpeed_13 < 1780) and (turbine_13.getFluidFlowRateMax() ~= 2000) then
  166.         turbine_13.setFluidFlowRateMax(2000)
  167.       end
  168.       if (turbineSpeed_14 < 1780) and (turbine_14.getFluidFlowRateMax() ~= 2000) then
  169.         turbine_14.setFluidFlowRateMax(2000)
  170.       end
  171.       if (turbineSpeed_15 < 1780) and (turbine_15.getFluidFlowRateMax() ~= 2000) then
  172.         turbine_15.setFluidFlowRateMax(2000)
  173.       end
  174.       if (turbineSpeed_16 < 1780) and (turbine_16.getFluidFlowRateMax() ~= 2000) then
  175.         turbine_16.setFluidFlowRateMax(2000)
  176.       end
  177.       if (turbineSpeed_17 < 1780) and (turbine_17.getFluidFlowRateMax() ~= 2000) then
  178.         turbine_17.setFluidFlowRateMax(2000)
  179.       end
  180.       if (turbineSpeed_18 < 1780) and (turbine_18.getFluidFlowRateMax() ~= 2000) then
  181.         turbine_18.setFluidFlowRateMax(2000)
  182.       end
  183.       ---------------------------------------------------------------------------------------------------------      
  184.       if (turbineSpeed_1 > 1780) and (turbineSpeed_1 <= 1850) and (turbine_1.getFluidFlowRateMax() ~= 2000) then
  185.         turbine_1.setFluidFlowRateMax(2000)
  186.         turbine_1.setInductorEngaged(true)
  187.       end
  188.       if (turbineSpeed_2 > 1780) and (turbineSpeed_2 <= 1850) and (turbine_2.getFluidFlowRateMax() ~= 2000) then
  189.         turbine_2.setFluidFlowRateMax(2000)
  190.         turbine_2.setInductorEngaged(true)
  191.       end
  192.       if (turbineSpeed_3 > 1780) and (turbineSpeed_3 <= 1850) and (turbine_3.getFluidFlowRateMax() ~= 2000) then
  193.         turbine_3.setFluidFlowRateMax(2000)
  194.         turbine_3.setInductorEngaged(true)
  195.       end
  196.       if (turbineSpeed_4 > 1780) and (turbineSpeed_4 <= 1850) and (turbine_4.getFluidFlowRateMax() ~= 2000) then
  197.         turbine_4.setFluidFlowRateMax(2000)
  198.         turbine_4.setInductorEngaged(true)
  199.       end
  200.       if (turbineSpeed_5 > 1780) and (turbineSpeed_5 <= 1850) and (turbine_5.getFluidFlowRateMax() ~= 2000) then
  201.         turbine_5.setFluidFlowRateMax(2000)
  202.         turbine_5.setInductorEngaged(true)
  203.       end
  204.       if (turbineSpeed_6 > 1780) and (turbineSpeed_6 <= 1850) and (turbine_6.getFluidFlowRateMax() ~= 2000) then
  205.         turbine_6.setFluidFlowRateMax(2000)
  206.         turbine_6.setInductorEngaged(true)
  207.       end
  208.       if (turbineSpeed_7 > 1780) and (turbineSpeed_7 <= 1850) and (turbine_7.getFluidFlowRateMax() ~= 2000) then
  209.         turbine_7.setFluidFlowRateMax(2000)
  210.         turbine_7.setInductorEngaged(true)
  211.       end
  212.       if (turbineSpeed_8 > 1780) and (turbineSpeed_8 <= 1850) and (turbine_8.getFluidFlowRateMax() ~= 2000) then
  213.         turbine_8.setFluidFlowRateMax(2000)
  214.         turbine_8.setInductorEngaged(true)
  215.       end
  216.       if (turbineSpeed_9 > 1780) and (turbineSpeed_9 <= 1850) and (turbine_9.getFluidFlowRateMax() ~= 2000) then
  217.         turbine_9.setFluidFlowRateMax(2000)
  218.         turbine_9.setInductorEngaged(true)
  219.       end
  220.       if (turbineSpeed_10 > 1780) and (turbineSpeed_10 <= 1850) and (turbine_10.getFluidFlowRateMax() ~= 2000) then
  221.         turbine_10.setFluidFlowRateMax(2000)
  222.         turbine_10.setInductorEngaged(true)
  223.       end
  224.       if (turbineSpeed_11 > 1780) and (turbineSpeed_11 <= 1850) and (turbine_11.getFluidFlowRateMax() ~= 2000) then
  225.         turbine_11.setFluidFlowRateMax(2000)
  226.         turbine_11.setInductorEngaged(true)
  227.       end
  228.       if (turbineSpeed_12 > 1780) and (turbineSpeed_12 <= 1850) and (turbine_12.getFluidFlowRateMax() ~= 2000) then
  229.         turbine_12.setFluidFlowRateMax(2000)
  230.         turbine_12.setInductorEngaged(true)
  231.       end
  232.       if (turbineSpeed_13 > 1780) and (turbineSpeed_13 <= 1850) and (turbine_13.getFluidFlowRateMax() ~= 2000) then
  233.         turbine_13.setFluidFlowRateMax(2000)
  234.         turbine_13.setInductorEngaged(true)
  235.       end
  236.       if (turbineSpeed_14 > 1780) and (turbineSpeed_14 <= 1850) and (turbine_14.getFluidFlowRateMax() ~= 2000) then
  237.         turbine_14.setFluidFlowRateMax(2000)
  238.         turbine_14.setInductorEngaged(true)
  239.       end
  240.       if (turbineSpeed_15 > 1780) and (turbineSpeed_15 <= 1850) and (turbine_15.getFluidFlowRateMax() ~= 2000) then
  241.         turbine_15.setFluidFlowRateMax(2000)
  242.         turbine_15.setInductorEngaged(true)
  243.       end
  244.       if (turbineSpeed_16 > 1780) and (turbineSpeed_16 <= 1850) and (turbine_16.getFluidFlowRateMax() ~= 2000) then
  245.         turbine_16.setFluidFlowRateMax(2000)
  246.         turbine_16.setInductorEngaged(true)
  247.       end
  248.       if (turbineSpeed_17 > 1780) and (turbineSpeed_17 <= 1850) and (turbine_17.getFluidFlowRateMax() ~= 2000) then
  249.         turbine_17.setFluidFlowRateMax(2000)
  250.         turbine_17.setInductorEngaged(true)
  251.       end
  252.       if (turbineSpeed_18 > 1780) and (turbineSpeed_18 <= 1850) and (turbine_18.getFluidFlowRateMax() ~= 2000) then
  253.         turbine_18.setFluidFlowRateMax(2000)
  254.         turbine_18.setInductorEngaged(true)
  255.       end
  256.      
  257.       -----------------------------------------------------------------------------------------------------------
  258.       if (turbineSpeed_1 > 1850) and (turbine_1.getFluidFlowRateMax() ~= 0) then
  259.         turbine_1.setFluidFlowRateMax(0)
  260.         turbine_1.setInductorEngaged(true)
  261.       end
  262.       if (turbineSpeed_2 > 1850) and (turbine_2.getFluidFlowRateMax() ~= 0) then
  263.         turbine_2.setFluidFlowRateMax(0)
  264.         turbine_2.setInductorEngaged(true)
  265.       end
  266.       if (turbineSpeed_3 > 1850) and (turbine_3.getFluidFlowRateMax() ~= 0) then
  267.         turbine_3.setFluidFlowRateMax(0)
  268.         turbine_3.setInductorEngaged(true)
  269.       end
  270.       if (turbineSpeed_4 > 1850) and (turbine_4.getFluidFlowRateMax() ~= 0) then
  271.         turbine_4.setFluidFlowRateMax(0)
  272.         turbine_4.setInductorEngaged(true)
  273.       end
  274.       if (turbineSpeed_5 > 1850) and (turbine_5.getFluidFlowRateMax() ~= 0) then
  275.         turbine_5.setFluidFlowRateMax(0)
  276.         turbine_5.setInductorEngaged(true)
  277.       end
  278.       if (turbineSpeed_6 > 1850) and (turbine_6.getFluidFlowRateMax() ~= 0) then
  279.         turbine_6.setFluidFlowRateMax(0)
  280.         turbine_6.setInductorEngaged(true)
  281.       end
  282.       if (turbineSpeed_7 > 1850) and (turbine_7.getFluidFlowRateMax() ~= 0) then
  283.         turbine_7.setFluidFlowRateMax(0)
  284.         turbine_7.setInductorEngaged(true)
  285.       end
  286.       if (turbineSpeed_8 > 1850) and (turbine_8.getFluidFlowRateMax() ~= 0) then
  287.         turbine_8.setFluidFlowRateMax(0)
  288.         turbine_8.setInductorEngaged(true)
  289.       end
  290.       if (turbineSpeed_9 > 1850) and (turbine_9.getFluidFlowRateMax() ~= 0) then
  291.         turbine_9.setFluidFlowRateMax(0)
  292.         turbine_9.setInductorEngaged(true)
  293.       end
  294.       if (turbineSpeed_10 > 1850) and (turbine_10.getFluidFlowRateMax() ~= 0) then
  295.         turbine_10.setFluidFlowRateMax(0)
  296.         turbine_10.setInductorEngaged(true)
  297.       end
  298.       if (turbineSpeed_11 > 1850) and (turbine_11.getFluidFlowRateMax() ~= 0) then
  299.         turbine_11.setFluidFlowRateMax(0)
  300.         turbine_11.setInductorEngaged(true)
  301.       end
  302.       if (turbineSpeed_12 > 1850) and (turbine_12.getFluidFlowRateMax() ~= 0) then
  303.         turbine_12.setFluidFlowRateMax(0)
  304.         turbine_12.setInductorEngaged(true)
  305.       end
  306.       if (turbineSpeed_13 > 1850) and (turbine_13.getFluidFlowRateMax() ~= 0) then
  307.         turbine_13.setFluidFlowRateMax(0)
  308.         turbine_13.setInductorEngaged(true)
  309.       end
  310.       if (turbineSpeed_14 > 1850) and (turbine_14.getFluidFlowRateMax() ~= 0) then
  311.         turbine_14.setFluidFlowRateMax(0)
  312.         turbine_14.setInductorEngaged(true)
  313.       end
  314.       if (turbineSpeed_15 > 1850) and (turbine_15.getFluidFlowRateMax() ~= 0) then
  315.         turbine_15.setFluidFlowRateMax(0)
  316.         turbine_15.setInductorEngaged(true)
  317.       end
  318.       if (turbineSpeed_16 > 1850) and (turbine_16.getFluidFlowRateMax() ~= 0) then
  319.         turbine_16.setFluidFlowRateMax(0)
  320.         turbine_16.setInductorEngaged(true)
  321.       end
  322.       if (turbineSpeed_17 > 1850) and (turbine_17.getFluidFlowRateMax() ~= 0) then
  323.         turbine_17.setFluidFlowRateMax(0)
  324.         turbine_17.setInductorEngaged(true)
  325.       end
  326.       if (turbineSpeed_18 > 1850) and (turbine_18.getFluidFlowRateMax() ~= 0) then
  327.         turbine_18.setFluidFlowRateMax(0)
  328.         turbine_18.setInductorEngaged(true)
  329.       end
  330.     end
  331.   end
  332.   --------------------------------------------------------------------------------------
  333.   if reactorRunning == false then
  334.     reactor.setActive(false)
  335.     if reactor.getActive == true then
  336.       reactor.setActive(false)
  337.     end
  338.     if turbine_1.getFluidFlowRateMax() ~= 0 then
  339.       turbine_1.setFluidFlowRateMax(0)
  340.     end
  341.     if turbine_1.getInductorEngaged() ~= false then
  342.       turbine_1.setInductorEngaged(false)
  343.     end
  344.     if turbine_2.getFluidFlowRateMax() ~= 0 then
  345.       turbine_2.setFluidFlowRateMax(0)
  346.     end
  347.     if turbine_2.getInductorEngaged() ~= false then
  348.       turbine_2.setInductorEngaged(false)
  349.     end
  350.     if turbine_3.getFluidFlowRateMax() ~= 0 then
  351.       turbine_3.setFluidFlowRateMax(0)
  352.     end
  353.     if turbine_3.getInductorEngaged() ~= false then
  354.       turbine_3.setInductorEngaged(false)
  355.     end
  356.     if turbine_4.getFluidFlowRateMax() ~= 0 then
  357.        turbine_4.setFluidFlowRateMax(0)
  358.     end
  359.     if turbine_4.getInductorEngaged() ~= false then
  360.       turbine_4.setInductorEngaged(false)
  361.     end
  362.     if turbine_5.getFluidFlowRateMax() ~= 0 then
  363.        turbine_5.setFluidFlowRateMax(0)
  364.     end
  365.     if turbine_5.getInductorEngaged() ~= false then
  366.       turbine_5.setInductorEngaged(false)
  367.     end
  368.     if turbine_6.getFluidFlowRateMax() ~= 0 then
  369.        turbine_6.setFluidFlowRateMax(0)
  370.     end
  371.     if turbine_6.getInductorEngaged() ~= false then
  372.       turbine_6.setInductorEngaged(false)
  373.     end
  374.     if turbine_7.getFluidFlowRateMax() ~= 0 then
  375.        turbine_7.setFluidFlowRateMax(0)
  376.     end
  377.     if turbine_7.getInductorEngaged() ~= false then
  378.       turbine_7.setInductorEngaged(false)
  379.     end
  380.     if turbine_8.getFluidFlowRateMax() ~= 0 then
  381.        turbine_8.setFluidFlowRateMax(0)
  382.     end
  383.     if turbine_8.getInductorEngaged() ~= false then
  384.       turbine_8.setInductorEngaged(false)
  385.     end
  386.     if turbine_9.getFluidFlowRateMax() ~= 0 then
  387.        turbine_9.setFluidFlowRateMax(0)
  388.     end
  389.     if turbine_9.getInductorEngaged() ~= false then
  390.       turbine_9.setInductorEngaged(false)
  391.     end
  392.     if turbine_10.getFluidFlowRateMax() ~= 0 then
  393.        turbine_10.setFluidFlowRateMax(0)
  394.     end
  395.     if turbine_10.getInductorEngaged() ~= false then
  396.       turbine_10.setInductorEngaged(false)
  397.     end
  398.     if turbine_11.getFluidFlowRateMax() ~= 0 then
  399.        turbine_11.setFluidFlowRateMax(0)
  400.     end
  401.     if turbine_11.getInductorEngaged() ~= false then
  402.       turbine_11.setInductorEngaged(false)
  403.     end
  404.     if turbine_12.getFluidFlowRateMax() ~= 0 then
  405.        turbine_12.setFluidFlowRateMax(0)
  406.     end
  407.     if turbine_12.getInductorEngaged() ~= false then
  408.       turbine_12.setInductorEngaged(false)
  409.     end
  410.     if turbine_13.getFluidFlowRateMax() ~= 0 then
  411.        turbine_13.setFluidFlowRateMax(0)
  412.     end
  413.     if turbine_13.getInductorEngaged() ~= false then
  414.       turbine_13.setInductorEngaged(false)
  415.     end
  416.     if turbine_14.getFluidFlowRateMax() ~= 0 then
  417.        turbine_14.setFluidFlowRateMax(0)
  418.     end
  419.     if turbine_14.getInductorEngaged() ~= false then
  420.       turbine_14.setInductorEngaged(false)
  421.     end
  422.     if turbine_15.getFluidFlowRateMax() ~= 0 then
  423.        turbine_15.setFluidFlowRateMax(0)
  424.     end
  425.     if turbine_15.getInductorEngaged() ~= false then
  426.       turbine_15.setInductorEngaged(false)
  427.     end
  428.     if turbine_16.getFluidFlowRateMax() ~= 0 then
  429.        turbine_16.setFluidFlowRateMax(0)
  430.     end
  431.     if turbine_16.getInductorEngaged() ~= false then
  432.       turbine_16.setInductorEngaged(false)
  433.     end
  434.     if turbine_17.getFluidFlowRateMax() ~= 0 then
  435.        turbine_17.setFluidFlowRateMax(0)
  436.     end
  437.     if turbine_17.getInductorEngaged() ~= false then
  438.       turbine_17.setInductorEngaged(false)
  439.     end
  440.     if turbine_18.getFluidFlowRateMax() ~= 0 then
  441.        turbine_18.setFluidFlowRateMax(0)
  442.     end
  443.     if turbine_18.getInductorEngaged() ~= false then
  444.       turbine_18.setInductorEngaged(false)
  445.     end
  446.   end
  447.   ------------------------------------------------------------------------------
  448.   --monitor.drawBox(1,14,20,26)
  449.   monitor.setCursorPos(1,1)
  450.   monitor.write("Batterie Füllstand: "..capacitorInt.."%")
  451.   monitor.setCursorPos(1,2)
  452.   monitor.write("Max Turbine Speed: ".. turbineSpeedMax .."rpm")
  453.   monitor.setCursorPos(1,3)
  454.   monitor.write("Min Turbine Speed: ".. turbineSpeedMin .."rpm")
  455.   monitor.setCursorPos(1,4)
  456.   sleep(0.2)
  457.   monitor.clear()
  458. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement