added ping
This commit is contained in:
parent
7d5eda49b8
commit
8d48cb8fbb
4
client
4
client
@ -52,6 +52,10 @@ while true do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
elseif type(data) == 'string' then
|
||||||
|
if data == 'ping' then
|
||||||
|
rednet.send(master, "Pong!")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
2
control
2
control
@ -73,6 +73,8 @@ function control()
|
|||||||
-- print(dump(input))
|
-- print(dump(input))
|
||||||
if input[1] == 'lookup' then
|
if input[1] == 'lookup' then
|
||||||
print(rednet.lookup("rmm", input[2]))
|
print(rednet.lookup("rmm", input[2]))
|
||||||
|
elseif input[1] == 'ping' then
|
||||||
|
rednet.send(tonumber(input[2]), 'ping')
|
||||||
elseif input[1] == 'eval' then
|
elseif input[1] == 'eval' then
|
||||||
rednet.send(tonumber(input[2]), {"eval", input[3]})
|
rednet.send(tonumber(input[2]), {"eval", input[3]})
|
||||||
elseif input[1] == 'move' then
|
elseif input[1] == 'move' then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user