[1.1.101] Ghost poles have copper wires in circuit_connection_definitions

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
SupplyDepoo
Filter Inserter
Filter Inserter
Posts: 286
Joined: Sat Oct 29, 2016 8:42 pm
Contact:

[1.1.101] Ghost poles have copper wires in circuit_connection_definitions

Post by SupplyDepoo »

Electric poles ghosts include copper cable connections in circuit_connection_definitions :: array[CircuitConnectionDefinition]? which should contain only elements with defines.wire_type.red or defines.wire_type.green.

The same copper connections are also listed in copper_connection_definitions.

Reproduction steps:
  1. Create a new Freeplay.
  2. Ghost-place two electric poles near each other.
  3. Run the console command: /c game.print(#game.player.selected.circuit_connection_definitions)
  4. The output will be: 1
  5. After reviving the ghosts, the output will be: 0

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2250
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.101] Ghost poles have copper wires in circuit_connection_definitions

Post by boskid »

Thanks for the report. Issue is now fixed for 1.1.105.

I have mixed feelings about fixing this since the timeline of introduction of copper_connection_definitions (added in 1.1.89) means that there is non zero chance that some mods could be actually using this bug in some cases, but i decided that this is wrong use case as it would not disambiguate between left and right wire of a power switch ghost so it is now fixed. This issue was already gone for 2.0 since LuaEntity::circuit_connection_definitions and LuaEntity::copper_connection_definitions will simply not exist anymore (they will be replaced with something a lot better).

Post Reply

Return to “Resolved Problems and Bugs”