34 lines
1,006 B
Lua
34 lines
1,006 B
Lua
tab = "self"
|
|
|
|
while true do
|
|
copy = require("rednetcopy")
|
|
turts = copy.lookup("tomfoolery")
|
|
table.insert(turts,{-1,"self"})
|
|
table.sort(
|
|
turts,
|
|
function(a,b)
|
|
return a[1] < b[1]
|
|
end
|
|
)
|
|
turtlenames = {}
|
|
x,y = term.getCursorPos()
|
|
term.setCursorPos(1,1)
|
|
for i,v in pairs(turts) do
|
|
if tab ~= v[2] then
|
|
term.setBackgroundColor((math.mod(i,2) == 0) and colors.lightGray or colors.cyan)
|
|
term.setTextColor(colors.black)
|
|
else
|
|
term.setBackgroundColor(colors.gray)
|
|
term.setTextColor(colors.white)
|
|
end
|
|
table.insert(turtlenames,v[2])
|
|
write(" "..v[2].." ")
|
|
end
|
|
term.setBackgroundColor(colors.brown)
|
|
write(" ")
|
|
term.setBackgroundColor(colors.black)
|
|
term.setTextColor(colors.white)
|
|
term.setCursorPos(x,y)
|
|
|
|
|
|
end
|