Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wrapPs(peripheralName)
- periTab = {}
- sideTab = {}
- if peripheralName == nil then
- print("Fehler")
- end
- local peripherals = peripheral.getNames()
- local i2 = 1
- for i = 1, #peripherals do
- if peripheral.getType(peripherals[i]) == peripheralName then
- periTab[i2] = peripheral.wrap(peripherals[i])
- sideTab[i2] = peripherals[i]
- i2 = i2 + 1
- end
- end
- if periTab ~= {} then
- return periTab, sideTab
- else
- return nil
- end
- end
- chestIn=peripheral.wrap("right")
- tank=peripheral.wrap("thermalexpansion:storage_tank_1")
- chestOut=peripheral.wrap("top")
- tanks=wrapPs("industrialforegoing:black_hole_controller_reworked_tile")
- amount=82944
- while true do
- fluid=chestIn.getItemMeta(1)
- sleep(2)
- if fluid~=nil then
- for i=1,#tanks do
- fluidName=fluid.printout.title
- print(fluidName)
- tanks[i].pushFluid("thermalexpansion:storage_tank_1", amount, fluidName)
- end
- chestIn.pushItems("top",1)
- else
- print("no item")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement