overview cleanup + chooser better events

This commit is contained in:
kepler155c@gmail.com
2018-11-12 20:21:35 -05:00
parent f9359cf77f
commit 62ac7a52ec
2 changed files with 17 additions and 16 deletions

View File

@@ -37,12 +37,12 @@ local extSupport = Util.getVersion() >= 1.76
local function loadApplications()
local requirements = {
turtle = function() return turtle end,
advancedTurtle = function() return turtle and term.isColor() end,
advanced = function() return term.isColor() end,
pocket = function() return pocket end,
advancedPocket = function() return pocket and term.isColor() end,
advancedComputer = function() return not turtle and not pocket and term.isColor() end,
turtle = not not turtle,
advancedTurtle = turtle and term.isColor(),
advanced = term.isColor(),
pocket = not not pocket,
advancedPocket = pocket and term.isColor(),
advancedComputer = not turtle and not pocket and term.isColor(),
}
applications = Util.readTable('sys/etc/app.db')
@@ -76,10 +76,7 @@ local function loadApplications()
end
if a.requires then
local fn = requirements[a.requires]
if fn and not fn() then
return false
end
return requirements[a.requires]
end
return true -- Util.startsWith(a.run, 'http') or shell.resolveProgram(a.run)