remove dependency on device global + milo backup config
This commit is contained in:
@@ -3,12 +3,11 @@ local Event = require('event')
|
||||
local UI = require('ui')
|
||||
local Util = require('util')
|
||||
|
||||
local args = { ... }
|
||||
local colors = _G.colors
|
||||
local device = _G.device
|
||||
local ni = device.neuralInterface
|
||||
local args = { ... }
|
||||
local colors = _G.colors
|
||||
local peripheral = _G.peripheral
|
||||
|
||||
local SHIELD_SLOT = 2
|
||||
local ni = peripheral.find('neuralInterface')
|
||||
local context = args[1]
|
||||
|
||||
if not context.state.autostore then
|
||||
|
||||
@@ -2,12 +2,12 @@ local Config = require('config')
|
||||
local UI = require('ui')
|
||||
local itemDB = require('core.itemDB')
|
||||
|
||||
local args = { ... }
|
||||
local colors = _G.colors
|
||||
local device = _G.device
|
||||
local ni = device.neuralInterface
|
||||
local args = { ... }
|
||||
local colors = _G.colors
|
||||
local peripheral = _G.peripheral
|
||||
|
||||
local context = args[1]
|
||||
local ni = peripheral.find('neuralInterface')
|
||||
|
||||
if not context.state.depositAll then
|
||||
context.state.depositAll = { }
|
||||
|
||||
@@ -2,9 +2,9 @@ local Milo = require('milo')
|
||||
local Sound = require('sound')
|
||||
local UI = require('ui')
|
||||
|
||||
local colors = _G.colors
|
||||
local context = Milo:getContext()
|
||||
local device = _G.device
|
||||
local colors = _G.colors
|
||||
local context = Milo:getContext()
|
||||
local peripheral = _G.peripheral
|
||||
|
||||
local speakerNode = context.storage:getSingleNode('speaker')
|
||||
if speakerNode then
|
||||
@@ -50,8 +50,7 @@ function wizardPage:validate()
|
||||
end
|
||||
|
||||
function wizardPage:isValidType(node)
|
||||
local m = device[node.name]
|
||||
return m and m.type == 'speaker' and {
|
||||
return peripheral.getType(node.name) == 'speaker' and {
|
||||
name = 'Speaker',
|
||||
value = 'speaker',
|
||||
category = 'custom',
|
||||
|
||||
Reference in New Issue
Block a user