diff --git a/bures-monitor.lua b/bures-monitor.lua index 1838642..6dee106 100644 --- a/bures-monitor.lua +++ b/bures-monitor.lua @@ -10,10 +10,10 @@ local buildings = colony.getBuildings() local buRes = {} local function clearMonitor() - term.setCursorBlink(false) - term.setTextScale(1.0) - term.clear() - term.setCursorPos(1, 1) + monitor.setCursorBlink(false) + monitor.setTextScale(1.0) + monitor.clear() + monitor.setCursorPos(1, 1) end local function tFilter(t, func) @@ -40,10 +40,12 @@ local function printBuRes() end local function bures() + local count = 0 for key, value in pairs(buildings) do + count = count + 1 local name = value.name if name == "" then - name = "Builder " .. tostring(value.level) + name = "Builder " .. tostring(count) end buRes[name] = colony.getBuilderResources(value.location) end