Page 1 of 1

[kovarex] [0.17.50] Ghost Trains not coupled when placed by bots

Posted: Fri Jun 21, 2019 5:36 am
by EnigmaticAussie
Steps to reproduce
Place:
Have bots build print.
Hover over any loco/wagon, check couplings.
Image
Not notice that several aren't fully connected.
Cry.

Manually replacing the loco or wagon correctly places/couples the train.
Expected behaviour:
Ghosted trains are fully coupled after placement.

Re: [kovarex] [0.17.50] Ghost Trains not coupled when placed by bots

Posted: Tue Jul 02, 2019 2:12 pm
by kovarex
Thanks for the report, this was a tricky one.
After some investigation, we found out, that the reason of this happening is, that sometimes, the rail between the two wagons is built after the neighbour rails and wagons are built.
So the wagons don't connect when being built, as there is no rail between them (yet, only the ghost), and when the rail is built later, they stay disconnected.

To solve this issue, we added a condition to revive buildability check. As long as there is a ghost rail next to any of the edges of the wagon to be revived, it can't be revived until the rail is built first. (Similar to the check of the rails right under the wagon having to be there).

I could reproduce the problem before, and it doesn't happen after the change, so it is fixed for the next release.

P.S. Adding trains to blueprints will be easy I thought. I didn't know how wrong was I. Similar as with the undo: The implementation being easy tricked me into underestimated the amount of edge cases that has to be taken care on later.

Re: [kovarex] [0.17.50] Ghost Trains not coupled when placed by bots

Posted: Wed Jul 03, 2019 1:07 am
by EnigmaticAussie
Thanks Kovarex!

Re: [kovarex] [0.17.50] Ghost Trains not coupled when placed by bots

Posted: Thu Jul 04, 2019 7:11 am
by th0
kovarex wrote:
Tue Jul 02, 2019 2:12 pm
P.S. Adding trains to blueprints will be easy I thought. I didn't know how wrong was I. Similar as with the undo: The implementation being easy tricked me into underestimated the amount of edge cases that has to be taken care on later.
Yet, both of these features are a great addition to the game and I enjoy very much that they are there.

Re: [kovarex] [0.17.50] Ghost Trains not coupled when placed by bots

Posted: Thu Jul 04, 2019 8:43 pm
by wizard07ksu
Despite small issues like this, and undo not undoing quite everything, I do love both of these features. With only a few minor exceptions, they work GREAT.

Thanks to the entire dev team for adding trains in blueprints and undo to the game!

Re: [kovarex] [0.17.50] Ghost Trains not coupled when placed by bots

Posted: Thu Jul 04, 2019 11:55 pm
by hale42
i have also had an issue where a train was waiting at a signal when a new train was being built and it connected to the active train, i think it was because the active train was close enough to the newly placed train that it auto connected. fixed by adding a space between the last wagon and the signal that a train could wait at.