milo wip
This commit is contained in:
@@ -267,7 +267,7 @@ if options.slot.value then
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
if options.slot.value or options.eslot.value then
|
if options.shield.value then
|
||||||
debug('Transfer items initialized')
|
debug('Transfer items initialized')
|
||||||
Event.onInterval(2, function()
|
Event.onInterval(2, function()
|
||||||
local neural = device.neuralInterface
|
local neural = device.neuralInterface
|
||||||
|
|||||||
@@ -33,14 +33,20 @@ debug('%s: %s', e, tostring(dev))
|
|||||||
end
|
end
|
||||||
|
|
||||||
function NetworkedAdapter:showStorage()
|
function NetworkedAdapter:showStorage()
|
||||||
debug('Storage:')
|
local t = { }
|
||||||
for k,v in pairs(self.remoteDefaults) do
|
for k,v in pairs(self.remoteDefaults) do
|
||||||
local online = v.adapter and v.adapter.online
|
local online = v.adapter and v.adapter.online
|
||||||
if not online then
|
if not online then
|
||||||
debug(' %s: %s', online and ' online' or 'offline', k)
|
table.insert(t, k)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
debug('')
|
if #t > 0 then
|
||||||
|
debug('Storage:')
|
||||||
|
for _, k in pairs(t) do
|
||||||
|
debug(' %s: %s', online and ' online' or 'offline', k)
|
||||||
|
end
|
||||||
|
debug('')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function NetworkedAdapter:setOnline(online)
|
function NetworkedAdapter:setOnline(online)
|
||||||
|
|||||||
@@ -12,14 +12,18 @@ function RedstoneTask:cycle(context)
|
|||||||
for _,v in pairs(context.config.remoteDefaults) do
|
for _,v in pairs(context.config.remoteDefaults) do
|
||||||
if v.redstone then
|
if v.redstone then
|
||||||
local ri = device[v.redstone.integrator]
|
local ri = device[v.redstone.integrator]
|
||||||
local function conditionsSatisfied()
|
if not ri or not v.adapter or not v.adapter.online then
|
||||||
return not not next(ri.list())
|
debug(v.redstone)
|
||||||
end
|
else
|
||||||
if conditionsSatisfied() then
|
local function conditionsSatisfied()
|
||||||
ri.setOutput(v.redstone.side, true)
|
return not not next(v.adapter.list())
|
||||||
Event.onTimeout(.25, function()
|
end
|
||||||
ri.setOutput(v.redstone.side, false)
|
if conditionsSatisfied() then
|
||||||
end)
|
ri.setOutput(v.redstone.side, true)
|
||||||
|
Event.onTimeout(.25, function()
|
||||||
|
ri.setOutput(v.redstone.side, false)
|
||||||
|
end)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ function storageView:eventHandler(event)
|
|||||||
field = event.element,
|
field = event.element,
|
||||||
message = 'The chest must contain the item to lock' })
|
message = 'The chest must contain the item to lock' })
|
||||||
self.form[3].value = false
|
self.form[3].value = false
|
||||||
|
self.form[3]:draw()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user