Atomzerg

Adapter420

Aug 2nd, 2021 (edited)
637
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.85 KB | None | 0 0
  1. local component = require("component")
  2. local diamond = component.diamond
  3. local reactor = component.reactor_chamber
  4. React = {}
  5. React.Uran = {1,17,21,24,38,41,44}
  6. React.TeplGoldUP = {4}
  7. React.TeplGray = {2,7,11,14,27,28,31,34,48,51,54}
  8. React.TeplGoldDown = {3,5,6,8,12,13,15,16,18,20,22,23,25,26,29,30,32,33,35,37,39,40,42,43,45,47,50,53}
  9. React.Plast = {9,10,19,36,46,49,52}
  10. PlastChest = {}
  11. UranCount = 1
  12. TeplGrayCount = 1
  13. TeplGoldDownCount = 1
  14. TeplGoldUPCount = 1
  15. PlastCount=0
  16. ChestSize = diamond.getInventorySize()
  17. PlastChestCount = 1
  18. PlastReactor = 1
  19.  
  20.  
  21.  
  22. for ActiveSlot = 1, #React.Uran do
  23.  
  24. if reactor.getStackInSlot(React.Uran[ActiveSlot]) ~= nil then
  25.     if reactor.getStackInSlot(React.Uran[ActiveSlot]).id ~= "IC2:reactorUraniumQuad" then
  26.         diamond.pullItem("Down",React.Uran[ActiveSlot])
  27. end
  28. if reactor.getStackInSlot(React.Uran[ActiveSlot]).id == "IC2:reactorUraniumQuad" then
  29.     UranCount = UranCount + 1
  30.     end
  31. end
  32.  
  33. end
  34.  
  35. for ActiveSlot = 1, #React.TeplGoldUP do
  36.  
  37. if reactor.getStackInSlot(React.TeplGoldUP[ActiveSlot]) ~= nil then
  38.     if reactor.getStackInSlot(React.TeplGoldUP[ActiveSlot]).id ~= "IC2:reactorHeatSwitchSpread" then
  39.         diamond.pullItem("Down",React.TeplGoldUP[ActiveSlot])
  40.  
  41. end
  42.  
  43. if reactor.getStackInSlot(React.TeplGoldUP[ActiveSlot]).id == "IC2:reactorHeatSwitchSpread" then
  44.     TeplGoldUPCount = TeplGoldUPCount + 1
  45.     end
  46.  
  47. end
  48.  
  49. end
  50.  
  51. for ActiveSlot = 1, #React.TeplGoldDown do
  52.  
  53. if reactor.getStackInSlot(React.TeplGoldDown[ActiveSlot]) ~= nil then
  54.     if reactor.getStackInSlot(React.TeplGoldDown[ActiveSlot]).id ~= "IC2:reactorVentGold" then
  55.         diamond.pullItem("Down",React.TeplGoldDown[ActiveSlot])
  56.  
  57. end
  58.  
  59. if reactor.getStackInSlot(React.TeplGoldDown[ActiveSlot]).id == "IC2:reactorVentGold" then
  60.     TeplGoldDownCount = TeplGoldDownCount + 1
  61.     end
  62.  
  63. end
  64.  
  65. end
  66.  
  67. for ActiveSlot = 1, #React.TeplGray do
  68.  
  69. if reactor.getStackInSlot(React.TeplGray[ActiveSlot]) ~= nil then
  70.     if reactor.getStackInSlot(React.TeplGray[ActiveSlot]).id ~= "IC2:reactorVentSpread" then
  71.         diamond.pullItem("Down",React.TeplGray[ActiveSlot])
  72.  
  73. end
  74.  
  75. if reactor.getStackInSlot(React.TeplGray[ActiveSlot]).id == "IC2:reactorVentSpread" then
  76.     TeplGrayCount = TeplGrayCount + 1
  77.     end
  78.  
  79. end
  80.  
  81. end
  82.  
  83. for ActiveSlot = 1, #React.Plast do
  84.  
  85. if reactor.getStackInSlot(React.Plast[ActiveSlot]) ~= nil then
  86.         diamond.pullItem("Down",React.Plast[ActiveSlot])
  87.  
  88. end
  89.  
  90. end
  91.  
  92.  
  93. for ActiveSlot = 1, ChestSize do
  94. Count  =  1
  95.  
  96. if diamond.getStackInSlot(ActiveSlot) ~= nil then
  97.  
  98. if Count==1 and diamond.getStackInSlot(ActiveSlot).id == "IC2:reactorUraniumQuad" and UranCount<8 then
  99. diamond.pushItem("Down",ActiveSlot,1,React.Uran[UranCount])
  100. UranCount = UranCount + 1
  101. Count = Count + 1
  102. end
  103.  
  104. if Count==1 and diamond.getStackInSlot(ActiveSlot).id == "IC2:reactorHeatSwitchSpread" and TeplGoldUPCount<2 then
  105. diamond.pushItem("Down",ActiveSlot,1,React.TeplGoldUP[TeplGoldUPCount])
  106. TeplGoldUPCount = TeplGoldUPCount + 1
  107. Count = Count + 1
  108. end
  109.  
  110. if Count==1 and diamond.getStackInSlot(ActiveSlot).id == "IC2:reactorVentGold" and TeplGoldDownCount<29 then
  111. diamond.pushItem("Down",ActiveSlot,1,React.TeplGoldDown[TeplGoldDownCount])
  112. TeplGoldDownCount = TeplGoldDownCount + 1
  113. Count = Count + 1
  114. end
  115.  
  116. if Count==1 and diamond.getStackInSlot(ActiveSlot).id == "IC2:reactorVentSpread" and TeplGrayCount<12 then
  117. diamond.pushItem("Down",ActiveSlot,1,React.TeplGray[TeplGrayCount])
  118. TeplGrayCount = TeplGrayCount + 1
  119. Count = Count + 1
  120. end
  121.  
  122. if Count==1 and diamond.getStackInSlot(ActiveSlot).id == "IC2:reactorPlating" and PlastCount<7 then
  123.     for PlastChestCount = 1, diamond.getStackInSlot(ActiveSlot).qty do
  124.     if PlastCount<7 then
  125.     diamond.pushItem("Down",ActiveSlot,1,React.Plast[PlastReactor])
  126.     PlastCount = PlastCount + 1
  127.     PlastReactor = PlastReactor + 1
  128. end
  129. end
  130.  
  131. end
  132. end
  133. end
  134.  
Add Comment
Please, Sign In to add comment