[0.17.76] set_blueprint_entities() removes logistic request filters from infinity logistic containers

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
Raiguard
Filter Inserter
Filter Inserter
Posts: 357
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

[0.17.76] set_blueprint_entities() removes logistic request filters from infinity logistic containers

Post by Raiguard »

Hello, this is a bit of an obscure bug that one of the users of my mod ran across. Take a look at this block of code:

Code: Select all

script.on_event(defines.events.on_player_setup_blueprint, function(e)
        local player = game.players[e.player_index]
        local bp = player.blueprint_to_setup
        if not bp or not bp.valid_for_read then
            bp = player.cursor_stack
        end
        local entities = bp.get_blueprint_entities()
        if not entities then return end
        bp.set_blueprint_entities(entities)
end)
This code causes the issue. As you can see, all the code is doing (after making sure the blueprint item is actually valid) is getting the blueprint entities, then setting those entities back into the blueprint. It is not modifying them whatsoever. I even had serpent print the entities table and the logistic request filters are in there! However, it appears that set_blueprint_entities() is destroying them.

See this demonstration:



This demo only shows an infinity buffer chest, but it happens to infinity storage and requester chests too. Regular (non-infinity) logistic containers are unaffected by this issue.
Attachments
infinity logistic chest bug report.mp4
(164.18 KiB) Downloaded 65 times
Don't forget, you're here forever.

Rseding91
Factorio Staff
Factorio Staff
Posts: 12205
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.76] set_blueprint_entities() removes logistic request filters from infinity logistic containers

Post by Rseding91 »

Thanks for the report. It's now fixed for the next version of 0.17.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”