SHOW:
|
|
- or go back to the newest paste.
| 1 | local maxItem = 2176 | |
| 2 | ||
| 3 | --######################-- | |
| 4 | ||
| 5 | ||
| 6 | chest = peripheral.wrap("draconic_chest_1")
| |
| 7 | local InvSize = chest.getInventorySize() | |
| 8 | while true do | |
| 9 | term.clear() | |
| 10 | term.setCursorPos(1,1) | |
| 11 | ||
| 12 | slot = 0 | |
| 13 | slotqt = 0 | |
| 14 | t = {}
| |
| 15 | ||
| 16 | for CurrSlot = 1, InvSize-1, 1 do | |
| 17 | if chest.getStackInSlot(CurrSlot) ~= nil then | |
| 18 | table.insert(t, chest.getStackInSlot(CurrSlot).display_name) | |
| 19 | slotqt = chest.getStackInSlot(CurrSlot).qty | |
| 20 | slot = slot + slotqt | |
| 21 | end | |
| 22 | end | |
| 23 | ||
| 24 | if slot == maxItem then | |
| 25 | rs.setAnalogOutput("back", 15)
| |
| 26 | sleep(0.5) | |
| 27 | rs.setAnalogOutput("right", 0)
| |
| 28 | print("true")
| |
| 29 | elseif slot == 0 then | |
| 30 | sleep(0.5) | |
| 31 | rs.setAnalogOutput("right", 15)
| |
| 32 | sleep(0.5) | |
| 33 | rs.setAnalogOutput("back", 0)
| |
| 34 | print("false")
| |
| 35 | end | |
| 36 | ||
| 37 | table.foreachi (t, print) | |
| 38 | sleep(2) | |
| 39 | end |