Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkColor(aspect)
- if aspect == "ignis" then return colors.red
- elseif aspect == "terra" then return colors.green
- elseif aspect == "aer" then return colors.yellow
- elseif aspect == "perditio" then return colors.gray
- elseif aspect == "aqua" then return colors.cyan
- elseif aspect == "ordo" then return colors.lightGray
- else return colors.white end
- end
- while 1 do
- nodes = {peripheral.find("tt_aspectContainer")}
- monitor = peripheral.find("monitor")
- monitor.clear()
- y = 1
- for i, node in ipairs(nodes) do
- x = 1
- total = 0
- for _, aspect in pairs(node.getAspects()) do
- monitor.setCursorPos(x, y+1)
- monitor.setTextColor(checkColor(aspect))
- monitor.write(aspect:gsub("^%l", string.upper))
- monitor.setTextColor(colors.white)
- monitor.setCursorPos(x, y+2)
- count = node.getAspectCount(aspect)
- total = total + count
- monitor.write(tostring(count))
- x = x + string.len(aspect) + 1
- end
- x = 1
- monitor.setCursorPos(x, y)
- monitor.write("Node "..tostring(i).." ("..tostring(total)..")")
- y = y + 4
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement