1
0
mirror of https://github.com/osmarks/random-stuff synced 2024-11-08 05:29:54 +00:00
random-stuff/computercraft/pocket-offload.lua
2023-11-13 19:37:05 +00:00

12 lines
358 B
Lua

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)