The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: zook2 on January 27, 2023, 01:06:15 PM

Title: Replacement of mail coaches
Post by: zook2 on January 27, 2023, 01:06:15 PM
Just a small request: when you buy a coach with a mail boot, the boot is added automatically. But when you replace a convoy with such a coach, it is not. If you don't pay attention to this, it leads to convoys stuck in the depot because they are incomplete and cannot leave. Would it be a lot of work to make the replacement window work similarly to the depot window?
Title: Re: Replacement of mail coaches
Post by: Ranran(retired) on January 29, 2023, 05:20:32 PM
That's a good point.


From a code perspective, the two dialogs share the same display behavior, but differ in their execution behavior. Because the depot dialog will purchase the vehicle when you select it, while the replace dialog is in the planning stage and will not purchase the vehicle. So adding a vehicle in the dialog is done in different code. I suppose this inconsistency is caused by the coder neglecting to add automatic connection handling to the replace dialog.
However, extended is often based on existing specifications in standard, so it can be difficult to provide precise support for extended additions. Sometimes it takes a lot of effort.

I checked it and found another omission.
The replace dialog does not show changes in station tiles when trying to deselect.
This also happens because the depot dialog and replace dialog are handled differently.


Quote from: zook2 on January 27, 2023, 01:06:15 PMWould it be a lot of work to make the replacement window work similarly to the depot window?
As already mentioned we need to add the code for the replace dialog separately from the depot dialog, but unfortunately this was easy. I have fixed them.

Since the station tile count and vehicle count changes are based on the depot dialog behavior, the replace dialog behavior is inconsistent (deceive the player) with this and players will definitely see it as a bug.

This is a bug fix for depot/replace dialog, so it's included in PR#601. Please confirm.

EDIT:
The one for ex-15 is the ex15-sortable2 branch.