[1.1.82] Power pole connection missing when replacing ghost with create_entity
Posted: Wed May 24, 2023 5:21 am
I was creating a power pole on top of a ghost using create_entity, and the newly created pole was missing one of the cables the ghost had, causing a disconnection.
Demonstration (sorry the volume is so low): https://www.youtube.com/watch?v=-DDF7EOwERs
It seems to be an issue because the lower cable already has 4 connections and no other power pole can reach the new entity. If another power pole can reach it or the closest power pole isn't almost full, it works as expected. Placing the power pole manually or placing with no ghost works. My wild guess is it's an issue where create_entity creates the entity before destroying the ghost, so it can't use the cable slot the ghost had, but placing manually destroys the ghost first or directly replaces it, so it can use that cable slot.
This is happening on 1.1.82, but I was also able to repro on 1.1.68 as well, so it's not a new issue.
Demonstration (sorry the volume is so low): https://www.youtube.com/watch?v=-DDF7EOwERs
It seems to be an issue because the lower cable already has 4 connections and no other power pole can reach the new entity. If another power pole can reach it or the closest power pole isn't almost full, it works as expected. Placing the power pole manually or placing with no ghost works. My wild guess is it's an issue where create_entity creates the entity before destroying the ghost, so it can't use the cable slot the ghost had, but placing manually destroys the ghost first or directly replaces it, so it can use that cable slot.
This is happening on 1.1.82, but I was also able to repro on 1.1.68 as well, so it's not a new issue.