Delete signal cables when stamping blueprints on top of existing entities

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
ignatio
Long Handed Inserter
Long Handed Inserter
Posts: 86
Joined: Mon Jun 27, 2016 3:59 pm
Contact:

Delete signal cables when stamping blueprints on top of existing entities

Post by ignatio »

TL;DR
Modify the stamping of blueprints to remove red and green cables from overlapping entities on the ground when there are no cables between them in the blueprint.
What ?
When a blueprint is stamped out on top of existing entities, it replaces the settings in them and adds any red and green cables that exist in the blueprint but not on the ground. So far so good, but the cables are only additive - if there is a cable on the ground but not in the blueprint it always stays. I propose to change the algorithm to also remove cables between entities when they aren't in the blueprint, but ONLY IF the entities at both ends of a cable exist in the blueprint.
Why ?
Removing a signal cable can often be done by manually deleting the entity at either end and then stamping a blueprint on top that recreates the entity without that cable. The blueprint then contains all the connections the entity still needs (I usually make it a wholesale affair of a chunk of the factory around it). For a repetitive change that means a bit of deleting and stamping, but it's still pretty ok. However, it doesn't work if:

- some of the things that connect to the entity aren't in the same places, or
- some of the things that connect to the entity have local customisations, e.g. values in constant combinators, since stamping the blueprint on top of them overwrites all their settings.

This happens particularly often when I want to remove signal wires between electric poles, because they usually connect to all sorts of things around them. When stamping cannot be used it becomes altogether a lot more tedious to remove every single cable by clicking at both ends, and it's easy to make mistakes and either add or remove the wrong cables.

With the change above it would be possible to use blueprint stamping in many more of those situations than currently.

I think it also makes stamping more consistent: It already overwrites settings in all overlapping entities, and then it stands to reason that it'd also apply to the connections between them. One can then e.g. make a blueprint of a combinator contraption and stamp it out with less risk of getting logic errors in it from old stuff on the ground.

Below is an example to give an idea of a situation where blueprint stamping currently cannot be used. It's my "smart trainloader" that I have copies of all over the factory and outposts.

Image

The drawback with this proposal is that cables might disappear where the user doesn't want them to. That case is however possible to address either by adding the cables before creating the blueprint, or by splitting up the blueprint so that the two entities at the cable ends aren't stamped at once (remember that the idea is to remove cables only if both ends are in the same blueprint). So blueprints can still be used even then, with just a little bit more effort.

Thanks!

Post Reply

Return to “Ideas and Suggestions”