WIP, please report problems so I can fix them.
This is my try on fixing bots de- and immediately reconstructing things when a blueprint is placed on an area marked for deconstruction.
Usually, when a ghost is placed on an entity which is marked for deconstruction, a bot will happily deconstruct the entity and then construct the ghost, even if the outcome is the same as pre-deconstructing. This mod changes this behavior in the following way:
If a ghost entity (by shift-placing or placing a blueprint) is placed on an entity marked for deconstruction of the same type, the ghost is destroyed immediately and the entity is unmarked for deconstruction.
If the direction of said entity is different from the new (the ghosts) direction, an "upgrade" is requested with the new direction.
If the entity is of the same type but different name (i.e. one is an upgrade of the other), an upgrade is requested.
If the ghost contains modules, a module request is created.