This commit is contained in:
kepler155c
2018-10-27 23:47:28 -04:00
parent dc6af1d0c3
commit 763f6bb27a
4 changed files with 23 additions and 12 deletions

View File

@@ -267,7 +267,7 @@ if options.slot.value then
end)
end
if options.slot.value or options.eslot.value then
if options.shield.value then
debug('Transfer items initialized')
Event.onInterval(2, function()
local neural = device.neuralInterface

View File

@@ -33,15 +33,21 @@ debug('%s: %s', e, tostring(dev))
end
function NetworkedAdapter:showStorage()
debug('Storage:')
local t = { }
for k,v in pairs(self.remoteDefaults) do
local online = v.adapter and v.adapter.online
if not online then
table.insert(t, k)
end
end
if #t > 0 then
debug('Storage:')
for _, k in pairs(t) do
debug(' %s: %s', online and ' online' or 'offline', k)
end
end
debug('')
end
end
function NetworkedAdapter:setOnline(online)
if online ~= self.storageOnline then

View File

@@ -12,8 +12,11 @@ function RedstoneTask:cycle(context)
for _,v in pairs(context.config.remoteDefaults) do
if v.redstone then
local ri = device[v.redstone.integrator]
if not ri or not v.adapter or not v.adapter.online then
debug(v.redstone)
else
local function conditionsSatisfied()
return not not next(ri.list())
return not not next(v.adapter.list())
end
if conditionsSatisfied() then
ri.setOutput(v.redstone.side, true)
@@ -24,5 +27,6 @@ function RedstoneTask:cycle(context)
end
end
end
end
Milo:registerTask(RedstoneTask)

View File

@@ -72,6 +72,7 @@ function storageView:eventHandler(event)
field = event.element,
message = 'The chest must contain the item to lock' })
self.form[3].value = false
self.form[3]:draw()
end
end
else