plethora import/export support + introspection module

This commit is contained in:
kepler155c
2018-03-29 05:04:34 -04:00
parent 55f49a1127
commit 08bc0d578e
3 changed files with 33 additions and 13 deletions

View File

@@ -14,10 +14,10 @@ function RefinedAdapter:init(args)
local controller
if not self.side then
controller = Peripheral.getByType('refinedstorage:controller')
controller = Peripheral.getByMethod('listAvailableItems')
else
controller = Peripheral.getBySide(self.side)
if controller and not controller.getCraftingTasks then
if controller and not controller.listAvailableItems then
controller = nil
end
end
@@ -131,7 +131,12 @@ function RefinedAdapter:provide(item, qty, slot, direction)
end)
end
function RefinedAdapter:insert()
function RefinedAdapter:extract(slot, qty, toSlot)
self.pushItems(self.direction, slot, qty, toSlot)
end
function RefinedAdapter:insert(slot, qty, toSlot)
self.pullItems(self.direction, slot, qty, toSlot)
end
return RefinedAdapter