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

@@ -1,6 +1,6 @@
local TableDB = require('tableDB')
local itemDB = TableDB({ fileName = 'usr/config/items.db' })
local itemDB = TableDB({ fileName = 'usr/etc/items.db' })
function itemDB:get(key)
@@ -13,6 +13,9 @@ function itemDB:get(key)
if key[2] ~= 0 then
item = TableDB.get(self, { key[1], 0, key[3] })
if item and item.maxDamage > 0 then
item = Util.shallowCopy(item)
item.damage = key[2]
item.displayName = string.format('%s (damage: %d)', item.displayName, item.damage)
return item
end
end