diff --git a/core/etc/apps/opus-apps.db b/core/etc/apps/opus-apps.db index 0cb8617..cd82806 100644 --- a/core/etc/apps/opus-apps.db +++ b/core/etc/apps/opus-apps.db @@ -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", diff --git a/milo/Milo.lua b/milo/Milo.lua index 7b44489..74a5635 100644 --- a/milo/Milo.lua +++ b/milo/Milo.lua @@ -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') diff --git a/milo/core/machines.lua b/milo/core/machines.lua index c353382..98cbba4 100644 --- a/milo/core/machines.lua +++ b/milo/core/machines.lua @@ -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 diff --git a/milo/plugins/listing.lua b/milo/plugins/listing.lua index bd554b7..f2d5065 100644 --- a/milo/plugins/listing.lua +++ b/milo/plugins/listing.lua @@ -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 diff --git a/core/etc/names/appliedenergistics2.json b/recipeBook/etc/names/appliedenergistics2.json similarity index 100% rename from core/etc/names/appliedenergistics2.json rename to recipeBook/etc/names/appliedenergistics2.json diff --git a/core/etc/names/computercraft.json b/recipeBook/etc/names/computercraft.json similarity index 100% rename from core/etc/names/computercraft.json rename to recipeBook/etc/names/computercraft.json diff --git a/core/etc/names/enderio.json b/recipeBook/etc/names/enderio.json similarity index 100% rename from core/etc/names/enderio.json rename to recipeBook/etc/names/enderio.json diff --git a/core/etc/names/exnihiloadscensio.json b/recipeBook/etc/names/exnihiloadscensio.json similarity index 100% rename from core/etc/names/exnihiloadscensio.json rename to recipeBook/etc/names/exnihiloadscensio.json diff --git a/core/etc/names/extrautils2.json b/recipeBook/etc/names/extrautils2.json similarity index 100% rename from core/etc/names/extrautils2.json rename to recipeBook/etc/names/extrautils2.json diff --git a/core/etc/names/ironchest.json b/recipeBook/etc/names/ironchest.json similarity index 100% rename from core/etc/names/ironchest.json rename to recipeBook/etc/names/ironchest.json diff --git a/core/etc/names/rftools.json b/recipeBook/etc/names/rftools.json similarity index 100% rename from core/etc/names/rftools.json rename to recipeBook/etc/names/rftools.json diff --git a/core/etc/names/storagedrawers.json b/recipeBook/etc/names/storagedrawers.json similarity index 100% rename from core/etc/names/storagedrawers.json rename to recipeBook/etc/names/storagedrawers.json diff --git a/core/etc/names/tconstruct.json b/recipeBook/etc/names/tconstruct.json similarity index 100% rename from core/etc/names/tconstruct.json rename to recipeBook/etc/names/tconstruct.json