Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component=require("component")
- local sides=require("sides")
- local ts=component.transposer
- local tsGIN=ts.getInventoryName
- local tsGIS=ts.getInventorySize
- local tsGSSS=ts.getSlotStackSize
- local tsGSIS=ts.getStackInSlot
- local tsTI=ts.transferItem
- local rs=component.redstone
- local sdPl, sdDr, sdCrUs
- --Placer, Drawer, CrafterUser
- for a=0, 5 do
- if tsGIN(a)=="actuallyadditions:block_placer" then sdPl=a
- elseif tsGIN(a)=="storagedrawers:controller" then sdDr=a
- elseif tsGIN(a)=="extrautils2:analogcrafter" then sdCrUs=a
- end
- end
- while true do
- for a=1,tsGIS(sdDr) do
- local item=tsGSIS(sdDr,a)
- if item then
- if item.name=="botania:petal" then
- local count=0
- for a=1, tsGIS(sdPl) do count=count+tsGSSS(sdPl,a) end
- for a=1, count do
- rs.setOutput(sides.back,1)
- rs.setOutput(sides.back,0)
- os.sleep(0.5)
- rs.setOutput(sides.left,1)
- rs.setOutput(sides.left,0)
- os.sleep(1)
- end
- count=0
- for a=1, tsGIS(sdCrUs) do count=count+tsGSSS(sdCrUs,a) end
- if count==0 and item.size<200 then
- tsTI(sdDr,sdPl,(220-item.size)/4,a)
- end
- end
- end
- end
- os.sleep(30)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement