Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local diamond = component.diamond
- local reactor = component.reactor_chamber
- React = {}
- React.Uran = {1,17,21,24,38,41,44}
- React.TeplGoldUP = {4}
- React.TeplGray = {2,7,11,14,27,28,31,34,48,51,54}
- 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}
- React.Plast = {9,10,19,36,46,49,52}
- PlastChest = {}
- UranCount = 1
- TeplGrayCount = 1
- TeplGoldDownCount = 1
- TeplGoldUPCount = 1
- PlastCount=0
- ChestSize = diamond.getInventorySize()
- PlastChestCount = 1
- PlastReactor = 1
- for ActiveSlot = 1, #React.Uran do
- if reactor.getStackInSlot(React.Uran[ActiveSlot]) ~= nil then
- if reactor.getStackInSlot(React.Uran[ActiveSlot]).id ~= "IC2:reactorUraniumQuad" then
- diamond.pullItem("Down",React.Uran[ActiveSlot])
- end
- if reactor.getStackInSlot(React.Uran[ActiveSlot]).id == "IC2:reactorUraniumQuad" then
- UranCount = UranCount + 1
- end
- end
- end
- for ActiveSlot = 1, #React.TeplGoldUP do
- if reactor.getStackInSlot(React.TeplGoldUP[ActiveSlot]) ~= nil then
- if reactor.getStackInSlot(React.TeplGoldUP[ActiveSlot]).id ~= "IC2:reactorHeatSwitchSpread" then
- diamond.pullItem("Down",React.TeplGoldUP[ActiveSlot])
- end
- if reactor.getStackInSlot(React.TeplGoldUP[ActiveSlot]).id == "IC2:reactorHeatSwitchSpread" then
- TeplGoldUPCount = TeplGoldUPCount + 1
- end
- end
- end
- for ActiveSlot = 1, #React.TeplGoldDown do
- if reactor.getStackInSlot(React.TeplGoldDown[ActiveSlot]) ~= nil then
- if reactor.getStackInSlot(React.TeplGoldDown[ActiveSlot]).id ~= "IC2:reactorVentGold" then
- diamond.pullItem("Down",React.TeplGoldDown[ActiveSlot])
- end
- if reactor.getStackInSlot(React.TeplGoldDown[ActiveSlot]).id == "IC2:reactorVentGold" then
- TeplGoldDownCount = TeplGoldDownCount + 1
- end
- end
- end
- for ActiveSlot = 1, #React.TeplGray do
- if reactor.getStackInSlot(React.TeplGray[ActiveSlot]) ~= nil then
- if reactor.getStackInSlot(React.TeplGray[ActiveSlot]).id ~= "IC2:reactorVentSpread" then
- diamond.pullItem("Down",React.TeplGray[ActiveSlot])
- end
- if reactor.getStackInSlot(React.TeplGray[ActiveSlot]).id == "IC2:reactorVentSpread" then
- TeplGrayCount = TeplGrayCount + 1
- end
- end
- end
- for ActiveSlot = 1, #React.Plast do
- if reactor.getStackInSlot(React.Plast[ActiveSlot]) ~= nil then
- diamond.pullItem("Down",React.Plast[ActiveSlot])
- end
- end
- for ActiveSlot = 1, ChestSize do
- Count = 1
- if diamond.getStackInSlot(ActiveSlot) ~= nil then
- if Count==1 and diamond.getStackInSlot(ActiveSlot).id == "IC2:reactorUraniumQuad" and UranCount<8 then
- diamond.pushItem("Down",ActiveSlot,1,React.Uran[UranCount])
- UranCount = UranCount + 1
- Count = Count + 1
- end
- if Count==1 and diamond.getStackInSlot(ActiveSlot).id == "IC2:reactorHeatSwitchSpread" and TeplGoldUPCount<2 then
- diamond.pushItem("Down",ActiveSlot,1,React.TeplGoldUP[TeplGoldUPCount])
- TeplGoldUPCount = TeplGoldUPCount + 1
- Count = Count + 1
- end
- if Count==1 and diamond.getStackInSlot(ActiveSlot).id == "IC2:reactorVentGold" and TeplGoldDownCount<29 then
- diamond.pushItem("Down",ActiveSlot,1,React.TeplGoldDown[TeplGoldDownCount])
- TeplGoldDownCount = TeplGoldDownCount + 1
- Count = Count + 1
- end
- if Count==1 and diamond.getStackInSlot(ActiveSlot).id == "IC2:reactorVentSpread" and TeplGrayCount<12 then
- diamond.pushItem("Down",ActiveSlot,1,React.TeplGray[TeplGrayCount])
- TeplGrayCount = TeplGrayCount + 1
- Count = Count + 1
- end
- if Count==1 and diamond.getStackInSlot(ActiveSlot).id == "IC2:reactorPlating" and PlastCount<7 then
- for PlastChestCount = 1, diamond.getStackInSlot(ActiveSlot).qty do
- if PlastCount<7 then
- diamond.pushItem("Down",ActiveSlot,1,React.Plast[PlastReactor])
- PlastCount = PlastCount + 1
- PlastReactor = PlastReactor + 1
- end
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment