bit of everything

This commit is contained in:
kepler155c@gmail.com
2017-07-23 22:37:07 -04:00
parent 027f386ed1
commit f8bcf90a6b
30 changed files with 866 additions and 502 deletions

View File

@@ -14,7 +14,6 @@ local keys = Util.transpose({
})
function ChestProvider:init(args)
local defaults = {
items = { },
name = 'chest',
@@ -43,12 +42,10 @@ function ChestProvider:getCachedItemDetails(item, k)
if not detail then
return
end
-- NOT SUFFICIENT
if detail.name ~= item.name then
return
end
if detail.maxDamage and detail.maxDamage > 0 and detail.damage > 0 then
detail.displayName = detail.displayName .. ' (damaged)'
end
for _,k in ipairs(Util.keys(detail)) do
if not keys[k] then
@@ -135,8 +132,8 @@ function ChestProvider:provide(item, qty, slot, direction)
end
end
function ChestProvider:extract(slot, qty)
self.pushItems(self.direction, slot, qty)
function ChestProvider:extract(slot, qty, toSlot)
self.pushItems(self.direction, slot, qty, toSlot)
end
function ChestProvider:insert(slot, qty)