Page 1 of 1

place entity ghost like in blueprint

Posted: Sat Nov 09, 2019 4:39 pm
by ichVII
Currently, if you place a entity ghost using create_entity, it does not try to merge with an equal entity at the same spot. In particular, if we place a ghost of an assembler over an assembler, that doesnt reset that assembler to no recipe, but it creates a ghost entity beneath it. If, however we deploy a blueprint of the assembler over it, the recipe adjusts to the one in the blueprint.

Is there an easy chain of commands that can create an entity ghost, but has the same result as placing a blueprint with the same properties?

You could for example place that entity ghost at a free space, take a blueprint of that and then deploy it at the actual position and delete the ghost and the blueprint you created.
That would have the desired result, but the "find a free space" step seems potentially annoying and unreliable, as the next free space might be far away. I have considered using a different surface, but im not sure if that is a good solution.

Edit: The get_blueprint_entities and set_blueprint_entities functions can do everything i need to do.