Update miniAdapter.lua
This commit is contained in:
@@ -19,7 +19,9 @@ function Adapter:listItems(throttle)
|
|||||||
local cache = { }
|
local cache = { }
|
||||||
throttle = throttle or Util.throttle()
|
throttle = throttle or Util.throttle()
|
||||||
|
|
||||||
for k,v in pairs(self.list()) do
|
local list = self.list()
|
||||||
|
|
||||||
|
for k,v in pairs(list) do
|
||||||
if v.count > 0 then
|
if v.count > 0 then
|
||||||
local key = table.concat({ v.name, v.nbt }, ':')
|
local key = table.concat({ v.name, v.nbt }, ':')
|
||||||
|
|
||||||
@@ -37,6 +39,10 @@ function Adapter:listItems(throttle)
|
|||||||
-- useful for when inserting into chests
|
-- useful for when inserting into chests
|
||||||
-- ie. insert only if chest does not have item and has free slots
|
-- ie. insert only if chest does not have item and has free slots
|
||||||
|
|
||||||
|
-- bodge to make statsView not delay
|
||||||
|
-- todo: handle this better properly
|
||||||
|
self.__used = Util.size(list)
|
||||||
|
|
||||||
self.cache = cache
|
self.cache = cache
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user