Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local reactor = peripheral.wrap("bottom")
- local rsetup = {0,0,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,1,1,1,2,1,1,1,0,0,1,1,1,2,1,1,1,0,0,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,0,0,0}
- local objn = {[0]="ic2.reactorVentGold",[1]="ic2.reactorCoolantSix",[2]="ic2.reactorUraniumQuad"}
- function checkSetupSlot(slot)
- for k,v in pairs(rsetup)do
- if(k==slot)then
- local itm = reactor.getStackInSlot(slot)
- if(itm~=nil)then
- if(itm.name==objn[rsetup[slot]])then
- if(rsetup[slot]==2)then
- --CONTROLL F壟F½R URANIUM ENERGIE ZUM ERSETZN
- return true;
- else
- return true;
- end
- else
- reactor.pushItem("down",slot)
- return false;
- end
- else
- return false;
- end
- end
- end
- end
- function lookingForSlot()
- end
- while true do
- for slot=1,54 do
- while checkSetupSlot(slot)==false do
- local sl = 1
- rs.setOutput("top",true)
- if(rsetup[slot]==0)then
- print("Slot: "..slot.." added new vent..")
- while reactor.pullItem("west",sl,1)==0 do
- if(sl<27)then sl=sl+1 else sl=1; end
- end
- elseif(rsetup[slot]==1)then
- print("Slot: "..slot.." added new coolant..")
- while reactor.pullItem("north",sl,1)==0 do
- if(sl<27)then sl=sl+1 else sl=1; end
- end
- elseif(rsetup[slot]==2)then
- print("Slot: "..slot.." added new uranium..")
- rs.setOutput("right",true)
- sleep(0.25)
- rs.setOutput("right",false)
- end
- sleep(0.025)
- end
- rs.setOutput("top",false)
- end
- sleep(0.025)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement