Hey man, no problem if you need help implementing or bug hunting let me know
I've just reread your reply to my initial comment. i think some players put the filter on the inserter, and others on the outserter, it shouldn't really matter as the products in the outserter chest will be limited. Definitely wasn't asking for the chest filters, although, another feature I have just thought of:
I use a 6x6 aai buffer chest with assemblers all around, the first assembler ingredients are added fine, the second assemblers recipe ingredients overwrite the first ingredients. It would be beneficial to add them rather than overwrite. However, I do use the filter helper mod that adds a gui which is a few extra clicks but does the job.
I feel really invested now and couldn't help myself: (feel free to not use / tweak)
function lib.apply_inserter_settings(game, player_index, inserter, data)
local behavior = inserter.get_or_create_control_behavior()
if not data then return end
if not behavior then return end
if not data.item then return end -- happens when the output is a fluid
local proto = prototypes.item[data.name]
if not proto then return end -- e.g. fluids don't have a useful prototype
local output_limit_type = settings.get_player_settings(player_index)["paste-logistic-settings-continued-output-limit-type"].value
local output_limit = settings.get_player_settings(player_index)["paste-logistic-settings-continued-output-limit"].value
local limit = helpers.get_limit(game, proto, output_limit_type, output_limit)
-- Check existing logistic condition
local current_limit = limit
if behavior.logistic_condition and behavior.logistic_condition.first_signal and behavior.logistic_condition.first_signal.name == data.name then
-- Same filter, increment by one stack size
local stack_size = proto.stack_size or 1
current_limit = behavior.logistic_condition.constant + stack_size
end
behavior.connect_to_logistic_network = true
behavior.logistic_condition = {
comparator = "<",
first_signal = { type = "item", name = data.name, quality = helpers.get_quality_string(data.quality) },
constant = current_limit,
}
-- Create flying text at inserter's position to display the filter
local text = "Filter: " .. data.name .. " < " .. current_limit
game.players[player_index].create_local_flying_text{
text = text,
position = inserter.position,
color = {r = 1, g = 1, b = 1}, -- White text
time_to_live = 120, -- Extended duration for readability
speed = 0.05 -- Default speed for short text
}
end