Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- local buildings = colony.getBuildings()
- local wo = colony.getWorkOrders()
- if wo ~= nil then
- monitor = peripheral.wrap("right")
- monitor.clear()
- monitor.setCursorPos(1,1)
- --for k,v in pairs(wo[2]) do
- --print(k..tostring(v))
- --end
- monitor.write("Work in progress")
- lineNumber = 2
- for i=1,#wo do
- if wo[i].type == "building" then
- builder = "Cox"
- if wo[i].claimedByBuilding.x == 85 then
- builder = "Glober"
- end
- monitor.setCursorPos(1,lineNumber)
- monitor.write(wo[i].upgrade.." "..builder)
- lineNumber = lineNumber + 1
- monitor.setCursorPos(1,lineNumber)
- ressources = colony.getWorkOrderResources(wo[i].id)
- if ressources ~= nil then
- --print(ressources)
- for j=1,#ressources do
- --print(ressources[j])
- r2 = ressources[j]
- if r2.status ~= "NOT_NEEDED" then
- monitor.write(r2.item.name:gsub("minecraft:", "").." "..r2.item.count)
- lineNumber = lineNumber + 1
- monitor.setCursorPos(1,lineNumber)
- end
- end
- end
- lineNumber = lineNumber + 1
- monitor.setCursorPos(1,lineNumber)
- end
- end
- for i=1,#buildings do
- --monitor.setCursorPos(1,lineNumber)
- b = buildings[i]
- built = tostring(b.built)
- wip = tostring(b.wip)
- level = b.level
- type = b.type
- if b.wip then
- --monitor.write(type.." "..level)
- lineNumber = lineNumber + 1
- end
- end
- end
- sleep(5)
- end
Add Comment
Please, Sign In to add comment