diff --git a/bures-monitor.lua b/bures-monitor.lua index f653772..ee896cf 100644 --- a/bures-monitor.lua +++ b/bures-monitor.lua @@ -15,9 +15,9 @@ local function clearMonitor() monitor.setCursorPos(1, 1) end -local function tFilter(table, func) +local function tFilter(t, func) local result = {} - for key, value in pairs(table) do + for key, value in pairs(t) do if func(value) then table.insert(result, value) end @@ -44,6 +44,7 @@ local function bures() end end -buildings = tFilter(buildings, function(value) return value.type == "builder" end) - clearMonitor() +buildings = tFilter(buildings, function(value) return value.type == "builder" end) +bures() +printBuRes()