Page 1 of 1

[2.0.12] Train stays at disabled station after getting interrupted to go to a not disabled station with the same name.

Posted: Wed Oct 30, 2024 2:36 am
by Snirp
When a train is at a disabled station (or limit = 0) and gets interrupted to go to a station with the same name. It stays at the same station (or paths to the same station) instead of one that is not disabled.

Steps to reproduce:
1. Open the save file "Spage age 1.zip"
2. Look at the purple train "build train"
3. The train is interrupted by the signal and waits for the 5 seconds inactivity condition.
4. The train switches to "working" mode, and instantly switches back to "waiting at stop" without moving.
5. This goes on forever.

Expected behaviour:
When the train gets interrupted to go to "Build Station" it should go to the available "Build Station" on the rail underneath it.
10-30-2024, 03-26-56.png
10-30-2024, 03-26-56.png (160.16 KiB) Viewed 368 times
As you can see on the image the train is stuck at the station and not moving.

Re: [2.0.12] Train stays at disabled station after getting interrupted to go to a not disabled station with the same nam

Posted: Thu Oct 31, 2024 8:28 pm
by Niedzwiedzislaw
Snirp wrote: Wed Oct 30, 2024 2:36 am When a train is at a disabled station (or limit = 0)
Did you actually try setting limit to 0? Because in my tests enable/disable doesn't change station limit. Disabled station displays limit as 0/None which is not the same as when I set limit to 0.

Just disabled
10-31-2024, 21-19-18.png
10-31-2024, 21-19-18.png (8.3 KiB) Viewed 345 times
With limit set:
10-31-2024, 21-21-39.png
10-31-2024, 21-21-39.png (7.93 KiB) Viewed 345 times

In fact, a train also stays on an enabled station unless the limit is lowered to 0. My guess is that train logic conditions are ordered in such a way, that the poor locomotive confuses current station with its next destination*.

EDIT: *Conditions order and some non trivial states related to time passage, movement and location in regard to station entity.

Re: [2.0.12] Train stays at disabled station after getting interrupted to go to a not disabled station with the same nam

Posted: Thu Oct 31, 2024 9:32 pm
by Snirp
You are correct, the issue doesn't occur when the limit is set to 0 by sending a signal L=0, only when the station is disabled. I never bothered trying this because I read somewhere that it should be the same, but it isn't.
I guess I just need an extra combinator to send a L=1 signal when the station is active.

That being said, there is still a bug with that disabling a station does something different from setting a station limit to 0.

Re: [2.0.12] Train stays at disabled station after getting interrupted to go to a not disabled station with the same nam

Posted: Thu Oct 31, 2024 9:48 pm
by Niedzwiedzislaw
Yeah, that part about enable and limit comes from https://factorio.com/blog/post/fff-395:
So in 2.0, disabled trains stops will act as if they have 'Train limit = 0':
I hope that it is bugged because I really don't want to place a solar panel and a battery at every station just to send an L signal from a combinator.

Re: [2.0.12] Train stays at disabled station after getting interrupted to go to a not disabled station with the same nam

Posted: Mon Nov 18, 2024 3:33 pm
by Loewchen