Page 1 of 1

[1.1.39] Trains are not rebuilt correctly after performing UNDO

Posted: Tue Sep 07, 2021 1:13 pm
by dabalciunas
Hi,

Trains on curved trails, especially when next to other trains, get rebuilt incorrectly when one deconstructs them and then undo the deconstruction. This happens with standard vanilla Factorio. See following screenshots:



1. Initial setup
1.jpg
1.jpg (196.5 KiB) Viewed 2015 times


2. Deconstruct right side
2.jpg
2.jpg (207.84 KiB) Viewed 2015 times


3. After deconstruction. Now undo with Ctrl+Z
3.jpg
3.jpg (170.53 KiB) Viewed 2015 times


4. Final result of undo after bots finished the reconstruction
4.jpg
4.jpg (188.34 KiB) Viewed 2015 times


5. The right train is incomplete, and has to be reconstructed manually, there is no other solution,
i.e. The undo action has permanently broken the right train.

Factorio 1.1.39, build 58937, win64

Re: Trains are not rebuilt correctly after performing UNDO

Posted: Tue Sep 07, 2021 1:17 pm
by dabalciunas
The minimal setup for reproducing this bug can be found in this attached savegame.

Re: [1.1.39] Trains are not rebuilt correctly after performing UNDO

Posted: Tue Sep 07, 2021 3:15 pm
by boskid
Hm... this looks to be related to removing train with rails because rolling stocks when placed by the undo action will not stay over the ghost rails but will snap onto real rails that are 2 tiles to the left.

Re: [1.1.39] Trains are not rebuilt correctly after performing UNDO

Posted: Sun Sep 12, 2021 7:33 pm
by dabalciunas
In any way it causes this undesired behavior. Please tell me if I can help providing any further information, I'll be looking this thread actively. And many thanks for your support too.

Re: [1.1.39] Trains are not rebuilt correctly after performing UNDO

Posted: Thu Oct 10, 2024 5:16 pm
by boskid
I am considering this issue to be minor. Core of the issue here is that rolling stock ghosts need to snap onto the rails and there is certain radius of how far they can snap around their original position. Since you removed rails and rolling stocks, when doing undo the rail ghosts appear where the train simply cannot snap onto however in small proximity there are other, real rails (non ghost ones) and the rolling stocks snap onto them. Trying to fix this could break rolling stock blueprint buildability because the rolling stocks would be required to use smaller snap distance value (smaller than 1).