Page 1 of 1

[1.1.69] Electric pole ghost does not respect draw_copper_wires=false

Posted: Sun Oct 16, 2022 7:32 am
by Stringweasel
What
When setting draw_copper_wires=false on an electric pole prototype the setting is ignored when placing ghosts.

Image
On the left is a pole-in-cursor, in the middle is an actual pole entity, and on the right is a pole ghost. Notice how there is a copper wire drawn only to the ghost.

This behaviour is exactly the same for `draw_circuit_wires`.
Expected Behaviour
When setting `draw_copper_wires=false` that the pole will never have copper wires drawn to it, even when it's a ghost.
Reproduction
  1. Change the prototype of any electric pole to include `draw_copper_wires = false`
  2. Place an entity, and then observe no copper wire drawn between the placed pole and your cursor.
  3. Shift-click to place a ghost close to the entity, and now notice how there's a copper wire drawn between the two.
Use Case
I came accross this in Fluidic Power where I hide the copper connections, and then delete the copper on_entity_built. This works well, but I noticed that the copper connection is still shown when the pole is a ghost.

Re: [1.1.69] Electric pole ghost does not respect draw_copper_wires=false

Posted: Sun Oct 16, 2022 8:17 am
by boskid
Thanks for the report. This issue was already fixed for 1.2 in a lot more generic and clean way so i had to decide if i even want to fix this in 1.1.x as well, but given a temporary fix has only 4 lines of code it is now also fixed for 1.1.71.

Re: [1.1.69] Electric pole ghost does not respect draw_copper_wires=false

Posted: Sun Oct 16, 2022 9:25 am
by Stringweasel
That was quick! And thank you :)