bures-monitor fix

This commit is contained in:
Buduf 2022-07-03 12:40:14 +02:00
parent 41e45832a9
commit 8213f1aa04

View File

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