[boskid][2.0.10] Undoing fast replacement disconnects circuit wires (removes/deletes/undo) (MR)

This subforum contains all the issues which we already resolved.
Netfire
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Oct 25, 2024 5:52 am
Contact:

[boskid][2.0.10] Undoing fast replacement disconnects circuit wires (removes/deletes/undo) (MR)

Post by Netfire »

If you manually replace a building (e.g. click over a slow inserter with a fast inserter), then undo the replacement, all wires are disconnected

This only occurs if the player character does the replacement; if a construction bot does it, the connections are maintained through the undo (which seems like the intended behavior). This happens when undoing after replacing an item with one of a different tier, with one of a different quality, or with the same item in a different rotation. The rotation one also issues an extra construction bot job when undoing, which isn't done if you overwrite the rotation via the map view or ghost planner before undoing.

Red and green circuit wires are disconnected, and so are wires between power poles

From my testing, this happened with:
  • Inserters, belts, power poles, and chests of different tiers
  • Chests of different rarities
  • Belts and inserters with different orientations
Attachments
bug.webm
(2.65 MiB) Downloaded 22 times
UraniumAnchor
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sat Apr 29, 2017 8:03 pm
Contact:

[2.0.12] Undo after fast replace belt doesn't restore circuit connection

Post by UraniumAnchor »

Steps to reproduce:
  • Have a circuit-connected belt segment
  • Fast replace segment with either an underground or splitter, severing the circuit connection
  • Undo replacement
Expected:

Belt is restored with the old circuit connection.

Actual:

Belt is restored, but circuit connection is not.

The following two scenarios DO restore the circuit connection, so I would expect the previous to as well:
  • Undoing belt deconstruction
  • Undoing forced replacement of belt with any other building (I used a substation to test this)
Merged...
ArEyeses
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed Nov 01, 2023 11:16 pm
Contact:

[2.0.15] Undoing fast replacement disconnects wires

Post by ArEyeses »

I'm noticing this as well in 2.0.15 on inserter quality changes (and presumably all the previously mentioned things as well)
and since this post already exists I'll just add a comment to it.
A few things I noticed:
- the inserter is marked for deconstruction along with a new inserter ghost; the improved behaviour would be marking it as 'upgrade to'.
- when ghost-upgrading (either by holding shift or from map view), undo works correctly.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3753
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.10] Undoing fast replacement disconnects circuit wires (removes/deletes/undo) (MR)

Post by boskid »

Thanks for the report. This issue should be now fixed for 2.0.43.

Fix is slightly scary because the fast replace does not involve recording entity upgrade, it is recorded as removal of old entity and building of new entity so in order for this to record properly i had to record removal and addition of wires in the undo action (they may be visible as part of the undo action) but the wires are restored properly. There may be a side effect of my changes affecting mods if they would be using hidden wires (script wires) as they will no longer be transfered when doing fast replace.
Post Reply

Return to “Resolved Problems and Bugs”