1
Fork 0
This repository has been archived on 2025-04-09. You can view files and clone it, but cannot push or open issues or pull requests.
computer-craft/slave
Joshua Moerman 4856635080 Working on system for getting stuff from chests (with buildcraft)
One master-console with a bring command
Multiple slaves which react to a broadcast (via wireless)
2012-06-02 22:54:33 +02:00

21 lines
451 B
Text

local args = { ... }
rednet.open("right")
while true do
-- we are using wireless to get the distance
-- so the master should be aligned with the slaves
local id, mess, dist = rednet.receive()
if mess == id then
turtle.up()
for i = 1, dist do turtle.back() end
-- TODO: wait for empty chest or something
sleep(1)
for i = 1, dist do turtle.forward() end
turtle.down()
end
end
-- TODO: activate redstone for the buildcraft engine