bures-monitor fix

This commit is contained in:
Buduf 2022-07-03 13:00:47 +02:00
parent 23082f1cbb
commit e327e902c2

View File

@ -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