1. Delete whole powerplant with deconstruction planner
2. Undo deletion with Ctrl+Z
Expected:
Circuit wiring around reactors (power poles hexagon) is normal
green-circuit-wiring-ok.jpeg (158.98 KiB) Viewed 373 times
Actual:
Circuit wiring around reactors has additional wires
green-circuit-wiring-messed.jpeg (159.97 KiB) Viewed 373 times
Hope this helps
Re: [2.0.27] Undoing blueprint deletion results in redundant wires within that blurprint
Posted: Thu Mar 06, 2025 11:14 am
by DemRat
Yeah, I have observed this a lot when building complicated circuitry. This is really annoying, as it completly breaks any readability. It effectively makes "undo" unusuable in that scenario, because every undo is immediately followed by like half a minute of figuring out which wires I need to remove again...
Re: [2.0.27] Undoing blueprint deletion results in redundant wires within that blurprint
Posted: Thu Mar 06, 2025 11:40 am
by boskid
I will consider this a duplicate of 118468. Core of the issue is that for undo wires to work, wires must be recorded during the action that removed entity and electric pole rewiring on removal is not happening when entity is marked to be deconstructed. When entities are marked to be deconstructed, wires are not yet removed and rewired so it cannot remember what wires will be created due to rewiring, it is the construction robot that arrives and deconstructs electric pole that causes rewire to happen. This action can no longer access undo of a player. Only case that maybe could be considered is removal of ghost electric poles as they never go into to-be-deconstructed state and are immediately removed so maybe at least those could record wires that were added due to electric pole rewiring.
Re: [2.0.27] Undoing blueprint deletion results in redundant wires within that blurprint
Posted: Thu Mar 06, 2025 11:53 am
by Hares
boskid wrote: Thu Mar 06, 2025 11:40 am
I will consider this a duplicate of 118468. Core of the issue is that for undo wires to work, wires must be recorded during the action that removed entity and electric pole rewiring on removal is not happening when entity is marked to be deconstructed. When entities are marked to be deconstructed, wires are not yet removed and rewired so it cannot remember what wires will be created due to rewiring, it is the construction robot that arrives and deconstructs electric pole that causes rewire to happen. This action can no longer access undo of a player. Only case that maybe could be considered is removal of ghost electric poles as they never go into to-be-deconstructed state and are immediately removed so maybe at least those could record wires that were added due to electric pole rewiring.
Can it be made so entities drop their wires the moment they are marked to be deconstructed instead of actually being deconstructed? Other entities stop to work immediately they are marked, so it's consistency :D
Re: [2.0.27] Undoing blueprint deletion results in redundant wires within that blurprint
Posted: Thu Mar 06, 2025 11:58 am
by boskid
Hares wrote: Thu Mar 06, 2025 11:53 am
Can it be made so entities drop their wires the moment they are marked to be deconstructed instead of actually being deconstructed? Other entities stop to work immediately they are marked, so it's consistency
No. Consistency does not apply here. Other entities when cancel deconstructed will connect back to other entities as the connections are position based (like 2 belts connect when they are next to each other). Wires are not position based. If you would order deconstruction of an entity and other player would cancel deconstruction then wires would be gone.