Simutrans Forum Archive
A complete record of the old Simutrans Forum.

Go to depot button issues (automatic cancellation, etc.)

Started by [C] Ranran, June 01, 2021, 11:10:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

[C] Ranran

The behavior regarding go to depot button has been broken for a long time with Extended.
It already existed in Extended 12.3 as far as I can confirm.

(A) Deceive us with the message "sent to depot" while refusing to go to the depot in some case
(B) Originally the button "Go to the depot" should be pressed if the convoy is heading to the depot
(C) "Destination:" display must be depot if heading to depot

At first I thought this was a UI-only issue and thought it could be easily fixed, so I tried to fix it, but it seems to be a bug lurking somewhere in the convoi sequence of code and is currently I couldn't find a solution.

This is caused by the selected schedule number being incremented or decremented for some reason.
As a result, the next stop display and the pressed "Go to depot" button are not working properly.

How to reliably reproduce (A):
(1) Open demo save
(2) Press the "Go to depot" button while the convoy belonging to "Tram Line 1" is heading from "High streey" to "Bridge Street"
(3) At first glance, the convoy looks like it's heading to the depot, but cancels before the depot and runs the original schedule.

Confirmation procedure of (B) and (C):
(1) Pause the game and press the Go to depot button on the convoy info dialog
(2) You can see that the destination is depot and the go to depot button is pressed
(3) Unpause the game
(4) Immediately after those displays will be incorrect

[C] Ranran

I think I have fixed this bug. Please check the pull request #497.

This bug had a pattern where the destination display was not depot, but went to depot correctly, and a pattern where it did not actually go to depot (somehow the schedule gets rewritten on the way into the depot).
Anyway, it seems that normalizing the selected schedule will fix both cases.

This may also solve the problem of replacing not functioning properly in some cases.


Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.