trainworld_computercraft/computer/24/startup.lua
2025-06-22 00:08:46 +02:00

22 lines
454 B
Lua

rednet.open("left")
forward = {}
for i,v in pairs(term.native()) do
forward[i] = function(...)
rednet.send(5,{i,{...}})
return v(...)
end
end
term.redirect(forward)
parallel.waitForAny(
function()
shell.run("shell")
end,
function()
while true do
id,message,protocol =
rednet.receive("pocketevent")
os.queueEvent(unpack(message))
end
end
)
shell.exit()