mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-02-05 13:15:03 +02:00
More fix
This commit is contained in:
parent
3150ab9b0a
commit
4a0c0dffa7
@ -40,6 +40,18 @@ local bps_blacklist = {
|
||||
['blueprint'] = true
|
||||
}
|
||||
|
||||
local get_filters = function (points)
|
||||
local filters = {}
|
||||
for _, section in pairs(points.sections) do
|
||||
for _, filter in pairs(section.filters) do
|
||||
if filter and filter.value and filter.value.name then
|
||||
filters[#filters + 1] = filter
|
||||
end
|
||||
end
|
||||
end
|
||||
return filters
|
||||
end
|
||||
|
||||
local on_init_token =
|
||||
Task.register(
|
||||
function ()
|
||||
@ -261,22 +273,11 @@ local function check_if_valid_requests(chest)
|
||||
end
|
||||
|
||||
if chest.type == 'logistic-container' then
|
||||
local filters = {}
|
||||
|
||||
local get_filters = function (points)
|
||||
for _, section in pairs(points.sections) do
|
||||
for _, filter in pairs(section.filters) do
|
||||
if filter and filter.value and filter.value.name then
|
||||
filters[#filters + 1] = filter
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local logistics = chest.get_logistic_point(defines.logistic_member_index.logistic_container)
|
||||
local count = get_filters(logistics)
|
||||
return #count > 0
|
||||
local filters = get_filters(logistics)
|
||||
return #filters > 0
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user