1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-29 06:37:40 +00:00
This commit is contained in:
kepler155c@gmail.com
2017-04-17 04:16:12 -04:00
parent 243bcb4ead
commit 17f4f8d9c1
2 changed files with 55 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ local Event = require('event')
local UI = require('ui')
local Socket = require('socket')
local Terminal = require('terminal')
local TableDB = require('tableDB')
multishell.setTitle(multishell.getCurrent(), 'Turtles')
UI.Button.defaults.focusIndicator = ' '
@@ -30,6 +31,12 @@ local policies = {
{ label = 'turtleSafe' },
}
local itemInfoDB = TableDB({
fileName = 'items.db'
})
itemInfoDB:load()
local page = UI.Page {
moveUp = UI.Button {
x = 5, y = 2,
@@ -179,7 +186,13 @@ function page.tabs.inventory:draw()
v.selected = true
end
if v.id then
v.id = v.id:gsub('.*:(.*)', '%1')
local item = itemInfoDB:get({ v.id, v.dmg })
debug(v)
if item then
v.id = item.displayName
else
v.id = v.id:gsub('.*:(.*)', '%1')
end
end
end
end