Hm... Ok, so I've started to look into this a bit, but I think the fixing will need to happen on the construction drones side. Based on what I currently see, construction drones do not take into the account the ghost entity's force - they will even build ghosts of an enemy force.
Construction planner is based around creating a parallel friendly force that the ghost entities get assigned to so the construction bots would not take them into account.
So... Construction drones should really ignore anything not belonging to their own force. There is additionally a kind of a race condition that would need to be taken into the account. If you unapprove the ghosts when the drones are already dispatched, they should bail out instead of constructing the ghosts that now belong to a wrong force.
@Tubbles - I can see at least one point where the check should be extended (construction_drone.lua@964
), but I think there's also some logic to find nearby related entities as well - so that would need to filter out the wrong force ghosts too. As a side-note, it could be perhaps be useful to explicitly exclude the unapproved-ghost-placeholder
entities as well (that's the tick-marks used to make the unapproved entities selectable).
Best regards,
Branko