You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
576 B
Lua
30 lines
576 B
Lua
-- Central Routing Controller
|
|
|
|
if not( event.type == "program" or event.type == "interrupt" ) then return end
|
|
|
|
if event.type == "program" then
|
|
types = {
|
|
"mcl_core:wood",
|
|
"mcl_core:cobble",
|
|
"mesecons:wire_00000000_off"
|
|
}
|
|
digiline_send("bay1", {action="set_types", types = types} )
|
|
end
|
|
|
|
interrupt(1)
|
|
port.c = not port.c
|
|
|
|
if( pin.b ) then
|
|
if port.a then return end
|
|
print("msg")
|
|
msg = {
|
|
action = "request",
|
|
itemstring = "mcl_core:wood",
|
|
count = 10
|
|
}
|
|
digiline_send( "bay1", msg )
|
|
port.a = true
|
|
else
|
|
port.a = false
|
|
end
|