News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

[Bug] class manager does not work properly with replace

Started by Ranran, October 12, 2020, 11:35:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran

An overview is shown in the image.


In the first place, the current vehicle is displayed on the class setting dialog. They are not vehicles to be replaced.

Therefore, the modifiable lists do not match. Only the one that happens to match will be changed.

For example, open demo.sve and add a 2-car LNER Tyneside EMU without a mail vehicle to Train commuter Chrisminster.
Then try to add a mail vehicle to that vehicle with Replace.

You cannot change the mail class. Because there is no combo box for the mail class.

Another example, replace it from 2 to 4 cars. Please change the class at that time. Only the previous two cars classes will be changed.
Note that it has only changed because the previous two types match. If they do not match, none of the classes will change.


Also, again, as someone pointed out, the capacity displayed under change prices is also incorrect. Because it doesn't count more vehicles than the one before the change.

Sirius

I can confirm this, but my observations differ in detail.
The displayed capacity underneath the "Change prices" button indeed sum up any capacities of up to the same number of cars as the previous train.
Try it out and replace the passenger train by only a mail train, you will see the mail capacity of that train displayed there. Append the passenger train after it and you will see the passenger capacity of the first car displayed.

The convoy (multiple vehicles) in the replacement dialogue is always the exact same as the one currently in use.
Try it out and replace the passenger convoy by only the mail vehicle again, or simply by a locomotive or anything else. The "Change prices" dialogue will always show the current convoy, not the new one.
Changing prices here will change the prices of the current convoy immediately!
The new convoy will leave the depot with the "default" prices of the new vehicles. (Well except if vehicles of that type with a different assignment are already stored in the depot)

Ranran

Does that mean that this button (= button to access change prices dialog) doesn't have to be in the replace dialog?

Vladki

The class manager in replace dialog is useless at the moment. But if it is rewritten to affect the new convoy, then it will be useful.

Sirius

Quote from: Ranran on October 25, 2020, 02:25:36 AMDoes that mean that this button (= button to access change prices dialog) doesn't have to be in the replace dialog?
Given current implementation, yes. The popping up class management window seems to be the exact same as the one of the currently running vehicle.
It would be better to actually allow us to set classes of the new convoy. Not sure how easy it is to implement though. It might be a small bug that's easy to fix or a complete missconception, I have really no idea.

Ranran

For your information, on the occasion of reviewing the depot dialog layout, I changed it so that this button does not appear in the replace dialog because Currently this button is misleading.

If anyone modifies the code so that it can change the class settings of  the convoy which has been replaced, please restore it.