spaces->tab, equipper improvements, supertreefarm rewrite, follow improvements, sensor cleanup, milo multiple items allowed in recipes, remote canvas access

This commit is contained in:
kepler155c@gmail.com
2019-06-18 15:23:20 -04:00
parent 3b9b509429
commit 045b32884f
162 changed files with 20448 additions and 20286 deletions

View File

@@ -7,41 +7,41 @@ local term = _G.term
local mon = term.current()
local args = { ... }
if args[1] then
mon = _G.device[args[1]]
mon = _G.device[args[1]]
end
if not mon then
error('Invalid monitor')
error('Invalid monitor')
end
mon.setBackgroundColor(colors.black)
mon.clear()
while true do
local socket = Socket.server(5901)
local socket = Socket.server(5901)
print('mirror: connection from ' .. socket.dhost)
print('mirror: connection from ' .. socket.dhost)
Event.addRoutine(function()
while true do
local data = socket:read()
if not data then
break
end
for _,v in ipairs(data) do
mon[v.f](unpack(v.args))
end
end
end)
Event.addRoutine(function()
while true do
local data = socket:read()
if not data then
break
end
for _,v in ipairs(data) do
mon[v.f](unpack(v.args))
end
end
end)
while true do
Event.pullEvent()
if not socket.connected then
break
end
end
while true do
Event.pullEvent()
if not socket.connected then
break
end
end
print('connection lost')
print('connection lost')
socket:close()
socket:close()
end