The International Simutrans Forum

 

Author Topic: [Bug] class manager does not work properly with replace  (Read 499 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranran

  • Devotee
  • *
  • Posts: 1658
  • 今日は兎汁よー
  • Languages: ja
[Bug] class manager does not work properly with replace
« on: October 12, 2020, 11:35:18 AM »
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.

Offline Freahk

  • Devotee
  • *
  • Posts: 1585
  • Languages: DE, EN
Re: [Bug] class manager does not work properly with replace
« Reply #1 on: October 12, 2020, 02:51:37 PM »
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)

Offline Ranran

  • Devotee
  • *
  • Posts: 1658
  • 今日は兎汁よー
  • Languages: ja
Re: [Bug] class manager does not work properly with replace
« Reply #2 on: October 25, 2020, 02:25:36 AM »
Does that mean that this button (= button to access change prices dialog) doesn't have to be in the replace dialog?

Offline Vladki

  • Devotee
  • *
  • Posts: 3726
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: [Bug] class manager does not work properly with replace
« Reply #3 on: October 25, 2020, 10:29:34 AM »
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.

Offline Freahk

  • Devotee
  • *
  • Posts: 1585
  • Languages: DE, EN
Re: [Bug] class manager does not work properly with replace
« Reply #4 on: October 25, 2020, 04:31:36 PM »
Does 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.

Offline Ranran

  • Devotee
  • *
  • Posts: 1658
  • 今日は兎汁よー
  • Languages: ja
Re: [Bug] class manager does not work properly with replace
« Reply #5 on: November 08, 2020, 05:49:24 AM »
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.