mirror of
https://github.com/osmarks/random-stuff
synced 2025-10-11 04:07:39 +00:00
add CC projects
This commit is contained in:
12
computercraft/pocket-offload.lua
Normal file
12
computercraft/pocket-offload.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
local spudnet_send, spudnet_background = require "ni-ctl_spudnet_interface"()
|
||||
|
||||
local function loop()
|
||||
while true do
|
||||
local _, data = os.pullEvent "spudnet_message"
|
||||
if data[1] == "exec" then
|
||||
spudnet_send { "result", peripheral.call("back", unpack(data[2])) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
parallel.waitForAll(loop, spudnet_background)
|
Reference in New Issue
Block a user