autocrafting improvements

This commit is contained in:
kepler155c
2017-12-13 01:38:59 -05:00
parent 73dc16703a
commit 0ce537d4ce
14 changed files with 2864 additions and 2379 deletions

View File

@@ -52,16 +52,16 @@ function itemDB:splitKey(key, item)
end
function itemDB:get(key)
if type(key) == 'string' then
key = self:makeKey(self:splitKey(key))
end
local item = TableDB.get(self, key)
if item then
return item
end
if type(key) == 'string' then
key = self:makeKey(self:splitKey(key))
end
if not key[2] or key[2] ~= 0 then
item = TableDB.get(self, { key[1], 0, key[3] })
if item and item.maxDamage > 0 then