[2.0.20] Time passed condition turns green instantly with only one stop

Post your bugs and problems so we can fix them.
TexTheAfk
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Dec 11, 2022 1:54 am
Contact:

[2.0.20] Time passed condition turns green instantly with only one stop

Post by TexTheAfk »

For a train with just one train stop in schedule, when stopping at a train stop, the time passed condition turns green immediately, even though the number of seconds configured is for example 120. When another train stop is added to the train schedule the train leaves the train stop immediatly since the condition is true already. This does not happen for conditions such at inactivity or full cargo inventory which work as expected even though there is just one train stop in the schedule.

The issue is reproducable. It can be observed when loading the safe file.
Time passed.png
Time passed.png (5.42 MiB) Viewed 152 times
Attachments
Space RDM v2 24 claim iron ore.zip
save file
(8.39 MiB) Downloaded 11 times
User avatar
Theragus
Long Handed Inserter
Long Handed Inserter
Posts: 59
Joined: Fri Oct 25, 2024 8:42 pm
Contact:

Re: [2.0.20] Time passed condition turns green instantly with only one stop

Post by Theragus »

Hi, I looked at your savefile and can confirm this behavior.
Although I am definitely not an expert on the rail code and logic I would probably suspect this is a small behavior for performance reasons since when you only have one stop, there is no point in having any time passing condition since the train doesn't need to go to any station next and the next station in the list would be the one the train is currently waiting.
If you have an interrupt the time passing condition works as you would expect, so you could create a dummy interrupt with conditions that never trigger as a workaround.
This also works if you set the waiting condition to AND instead of OR.
Never Stop!
Post Reply

Return to “Bug Reports”