mmm
This commit is contained in:
parent
5422d52065
commit
4f2631b349
24 changed files with 414 additions and 5665 deletions
34
computer/5/test2.lua
Normal file
34
computer/5/test2.lua
Normal file
|
@ -0,0 +1,34 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue