SHOW:
|
|
- or go back to the newest paste.
1 | - | function wrapPs(peripheralName) |
1 | + | tankIn=peripheral.wrap("right") |
2 | - | periTab = {} |
2 | + | tankCreative=peripheral.wrap("top") |
3 | - | sideTab = {} |
3 | + | tankOut=peripheral.wrap("left") |
4 | - | if peripheralName == nil then |
4 | + | printer=peripheral.wrap("back") |
5 | - | print("Fehler") |
5 | + | |
6 | - | end |
6 | + | amount=9999999999 |
7 | - | local peripherals = peripheral.getNames() |
7 | + | |
8 | - | local i2 = 1 |
8 | + | fluidName=tankIn.getMetadata().tanks[1].name |
9 | - | for i = 1, #peripherals do |
9 | + | tankIn.pushFluid("top", amount, fluidName) |
10 | - | if peripheral.getType(peripherals[i]) == peripheralName then |
10 | + | tankCreative.pushFluid("right", amount, fluidName) |
11 | - | periTab[i2] = peripheral.wrap(peripherals[i]) |
11 | + | amount1=tankCreative.pushFluid("left", amount, fluidName) |
12 | - | sideTab[i2] = peripherals[i] |
12 | + | amount2=tankCreative.pushFluid("left", amount, fluidName) |
13 | - | i2 = i2 + 1 |
13 | + | print(amount1+amount2) |
14 | - | end |
14 | + | printer.newPage() |
15 | - | end |
15 | + | printer.setPageTitle(fluidName) |
16 | - | if periTab ~= {} then |
16 | + | printer.endPage() |
17 | - | return periTab, sideTab |
17 | + |