bures-monitor fix
This commit is contained in:
parent
41e45832a9
commit
8213f1aa04
@ -15,9 +15,9 @@ local function clearMonitor()
|
|||||||
monitor.setCursorPos(1, 1)
|
monitor.setCursorPos(1, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function tFilter(table, func)
|
local function tFilter(t, func)
|
||||||
local result = {}
|
local result = {}
|
||||||
for key, value in pairs(table) do
|
for key, value in pairs(t) do
|
||||||
if func(value) then
|
if func(value) then
|
||||||
table.insert(result, value)
|
table.insert(result, value)
|
||||||
end
|
end
|
||||||
@ -44,6 +44,7 @@ local function bures()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
buildings = tFilter(buildings, function(value) return value.type == "builder" end)
|
|
||||||
|
|
||||||
clearMonitor()
|
clearMonitor()
|
||||||
|
buildings = tFilter(buildings, function(value) return value.type == "builder" end)
|
||||||
|
bures()
|
||||||
|
printBuRes()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user