From 8213f1aa04b898a599074b123b6cc3c6d364a1d7 Mon Sep 17 00:00:00 2001 From: Buduf Date: Sun, 3 Jul 2022 12:40:14 +0200 Subject: [PATCH] bures-monitor fix --- bures-monitor.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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()