milo wip
This commit is contained in:
@@ -12,14 +12,18 @@ function RedstoneTask:cycle(context)
|
||||
for _,v in pairs(context.config.remoteDefaults) do
|
||||
if v.redstone then
|
||||
local ri = device[v.redstone.integrator]
|
||||
local function conditionsSatisfied()
|
||||
return not not next(ri.list())
|
||||
end
|
||||
if conditionsSatisfied() then
|
||||
ri.setOutput(v.redstone.side, true)
|
||||
Event.onTimeout(.25, function()
|
||||
ri.setOutput(v.redstone.side, false)
|
||||
end)
|
||||
if not ri or not v.adapter or not v.adapter.online then
|
||||
debug(v.redstone)
|
||||
else
|
||||
local function conditionsSatisfied()
|
||||
return not not next(v.adapter.list())
|
||||
end
|
||||
if conditionsSatisfied() then
|
||||
ri.setOutput(v.redstone.side, true)
|
||||
Event.onTimeout(.25, function()
|
||||
ri.setOutput(v.redstone.side, false)
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user