recipe reorg + milo fixes
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
\030 \031f\030f\031f\128\0317\143\031f\128\128\0317\143\031f\128\128\128",
|
||||
run = "Turtles.lua",
|
||||
},
|
||||
--[[
|
||||
Needs work
|
||||
[ "381e3298b2b8f6caeb2208b57d805ada38402f0b" ] = {
|
||||
title = "Scripts",
|
||||
category = "Apps",
|
||||
@@ -21,6 +23,7 @@
|
||||
\0300\0317else\140",
|
||||
run = "Script.lua",
|
||||
},
|
||||
]]
|
||||
c5497bca58468ae64aed6c0fd921109217988db3 = {
|
||||
title = "Events",
|
||||
category = "System",
|
||||
|
||||
@@ -67,6 +67,10 @@ if not modem or not modem.getNameLocal then
|
||||
Syntax('Wired modem missing')
|
||||
end
|
||||
|
||||
if not modem.getNameLocal() then
|
||||
Syntax('Wired modem is not active')
|
||||
end
|
||||
|
||||
local introspection = Peripheral.get('plethora:introspection') or
|
||||
Syntax('Introspection module missing')
|
||||
|
||||
|
||||
@@ -143,20 +143,19 @@ function networkPage:disable()
|
||||
end
|
||||
|
||||
function networkPage:applyFilter()
|
||||
local t = context.config.nodes
|
||||
local filter = self.filter.value
|
||||
local t = Util.filter(context.config.nodes, function(v)
|
||||
return not v.hidden
|
||||
end)
|
||||
|
||||
if #filter > 0 then
|
||||
t = { }
|
||||
filter = filter:lower()
|
||||
|
||||
for _,v in pairs(context.config.nodes) do
|
||||
if (v.displayName and string.find(string.lower(v.displayName), filter, 1, true)) or
|
||||
string.find(string.lower(v.name), filter, 1, true) then
|
||||
table.insert(t, v)
|
||||
end
|
||||
end
|
||||
if #self.filter.value > 0 then
|
||||
local filter = self.filter.value:lower()
|
||||
Util.filterInplace(t, function(v)
|
||||
return v.displayName and
|
||||
string.find(string.lower(v.displayName), filter, 1, true) or
|
||||
string.find(string.lower(v.name), filter, 1, true)
|
||||
end)
|
||||
end
|
||||
|
||||
self.grid:setValues(t)
|
||||
end
|
||||
|
||||
@@ -391,10 +390,12 @@ function nodeWizard.wizard.pages.general:showInventory(node)
|
||||
local inventory
|
||||
|
||||
if device[node.name] and device[node.name].list then
|
||||
inventory = device[node.name].list()
|
||||
for k,v in pairs(inventory) do
|
||||
v.slot = k
|
||||
end
|
||||
pcall(function()
|
||||
inventory = device[node.name].list()
|
||||
for k,v in pairs(inventory) do
|
||||
v.slot = k
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
self.grid:setValues(inventory or { })
|
||||
@@ -438,16 +439,17 @@ function nodeWizard:enable(node)
|
||||
self.node.adapter = adapter
|
||||
node.adapter = adapter
|
||||
|
||||
_G._p3 = self.node
|
||||
_G._p3 = self.node -- TODO: remove - debugging
|
||||
|
||||
local choices = {
|
||||
{ name = 'Ignore', value = 'ignore' },
|
||||
{ name = 'Ignore', value = 'ignore', '' },
|
||||
{ name = 'Hidden', value = 'hidden', 'Do not show in list' },
|
||||
}
|
||||
for _, page in pairs(self.wizard.pages) do
|
||||
if page.isValidType then
|
||||
local choice = page:isValidType(self.node)
|
||||
if choice and not Util.find(choices, 'value', choice.value) then
|
||||
table.insert(choices, choice)
|
||||
table.insert(choices, 2, choice)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -252,15 +252,20 @@ function listingPage:enable()
|
||||
self:sync()
|
||||
end)
|
||||
|
||||
self.handler = Event.on({ 'storage_offline', 'storage_online' }, function(_, isOnline)
|
||||
local function updateStatus()
|
||||
self.statusBar.storageStatus.value =
|
||||
isOnline and '' or 'offline'
|
||||
context.storage:isOnline() and '' or 'offline'
|
||||
self.statusBar.storageStatus.textColor =
|
||||
isOnline and colors.lime or colors.red
|
||||
context.storage:isOnline() and colors.lime or colors.red
|
||||
end
|
||||
|
||||
self.handler = Event.on({ 'storage_offline', 'storage_online' }, function()
|
||||
updateStatus()
|
||||
self.statusBar.storageStatus:draw()
|
||||
self:sync()
|
||||
end)
|
||||
|
||||
updateStatus()
|
||||
UI.Page.enable(self)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user