From d82cef0546b2f32f79ff3c9638719b2420b72d01 Mon Sep 17 00:00:00 2001 From: kepler155c Date: Thu, 29 Mar 2018 17:47:16 -0400 Subject: [PATCH] plethora import/export support --- apis/meAdapter.lua | 9 +++------ apis/meAdapter18.lua | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/apis/meAdapter.lua b/apis/meAdapter.lua index 77ed989..af7d1af 100644 --- a/apis/meAdapter.lua +++ b/apis/meAdapter.lua @@ -243,14 +243,11 @@ function MEAdapter:provide(item, qty, slot, direction) end) end -function MEAdapter:insert(slot, count) - local s, m = pcall(function() self.pullItem(self.direction, slot, count) end) +function MEAdapter:insert(slot, qty, toSlot) + local s, m = pcall(self.pullItem, self.direction, slot, qty, toSlot) if not s and m then os.sleep(1) - s, m = pcall(function() self.pullItem(self.direction, slot, count) end) - if not s and m then - error(m) - end + pcall(self.pullItem, self.direction, slot, qty, toSlot) end end diff --git a/apis/meAdapter18.lua b/apis/meAdapter18.lua index 56e4552..f19e3db 100644 --- a/apis/meAdapter18.lua +++ b/apis/meAdapter18.lua @@ -81,7 +81,6 @@ _G._p = self.jobList if job.name == item.name and job.damage == item.damage and job.nbtHash == item.nbtHash then -debug('still crafting') return true end end