[2.0.72] set_blueprint_entities makes the cutted entities forget their external wire connections

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Natha
Filter Inserter
Filter Inserter
Posts: 287
Joined: Sun Mar 15, 2015 1:48 pm
Contact:

[2.0.72] set_blueprint_entities makes the cutted entities forget their external wire connections

Post by Natha »

Relating to https://www.factorio.com/blog/post/fff-402. When using set_blueprint_entities, even without modifying anything, it forgets those wire connectiong going to external entities.

Code: Select all

script.on_event(defines.events.on_player_setup_blueprint, function(event)
	local item = event.record or event.stack
	item.set_blueprint_entities(item.get_blueprint_entities())
end)
Can we have the possibility to read and preserve those outgoing connections when using the cut tool?
Rseding91
Factorio Staff
Factorio Staff
Posts: 16258
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.72] set_blueprint_entities makes the cutted entities forget their external wire connections

Post by Rseding91 »

Thanks for the report however when you do what you’re doing you are functionally deleting and re-creating the entire blueprint. The game has no way to know the entities you replaced the contents with are “the same”.

As for reading the external connections, that can likely be done through a new API, but would go into modding interface requests.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Modding interface requests”