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)
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.