The International Simutrans Forum

Simutrans Extended => Patches/pull requests for consideration => Simutrans-Extended development => Incorporated patches/merged pull requests => Topic started by: anoKTOK on May 07, 2020, 01:00:08 PM

Title: [patch]vehicles show line name or convoy name
Post by: anoKTOK on May 07, 2020, 01:00:08 PM
This is a patch of soukouki and anoKTOK.

Overview:
Vehicles show line name or convoy name.

Source code:
https://github.com/anoKTOK/simutrans-extended-building-extension/tree/vehicles_show_line_name_or_convoi_name (https://github.com/anoKTOK/simutrans-extended-building-extension/tree/vehicles_show_line_name_or_convoi_name)
Remark. This source is based on the latest version (2020/ May / 07).


How to use:
(https://simutrans-germany.com/files/upload/20200507_sou_patch4.png)
(1) Open Option.
(2) Select Display.
(3) Choose "line name tooltips" where we often choose "convoi error tooltips", "convoi mouseover tooltips" and "all convoi tooltips".

Behavior:
If a vehicle have a line name, the vehicle shows the line name.
Otherwise, the vehicle shows the convoy name.

Example:
(https://simutrans-germany.com/files/upload/20200507_sou_patch2.PNG)
This is a picture near Nagasaki station.

tab:
line name tooltips
Title: Re: [patch]vehicles show line name or convoy name
Post by: Vladki on May 07, 2020, 06:39:05 PM
Wow, that's cool ;)
Title: Re: [patch]vehicles show line name or convoy name
Post by: Mariculous on May 07, 2020, 07:56:33 PM
Indeed a nice one :)
I'll always know immediately if that tram was intended to run on the mainline or just did a stupid detour because I messed up the route :D
Title: Re: [patch]vehicles show line name or convoy name
Post by: prissi on May 08, 2020, 03:08:25 PM
Was a very good idea, now in r9077 in standard too. (Since I could not easily find the diff, I just wrote it myself.)
Title: Re: [patch]vehicles show line name or convoy name
Post by: anoKTOK on May 09, 2020, 07:15:20 AM
Quote from: prissi on May 08, 2020, 03:08:25 PM
Was a very good idea, now in r9077 in standard too. (Since I could not easily find the diff, I just wrote it myself.)

Thank you very much for adding this patch!


Quote from: Ranran on May 09, 2020, 12:07:10 AM
IMO, some improvements will make it even better.


1) Separate from the convoy status message and assign a dedicated shortcut key. Because it's different genre information than displaying convoy alerts.
I don't think it is a good idea to hide the anomalous status with this display. Not suitable for constant display.

And while this display is convenient, at the same time it tends to be very annoying, so it is preferable that it can be easily turned on and off. However, it is troublesome to switch if it is in an unrelated cycle. It would be convenient to be able to separate and turn on and off only that.


2) Add an option to show it only when the mouse is over.
As mentioned above, this display can be very annoying, so if it has such option, I would prefer to use that option during usual.


3) Avoid confusion with station name displays.
The station name can switch between multiple display styles, but this is not possible. Therefore, if the station display is a square box with a player color background, it is difficult to distinguish it from that. (I usually use that style.)

I had some ideas; adding a waytype symbol to the name, adding a status bar to make it look different from the station etc
For the time being, I try to avoid conflict with the station display by making white letters on a dark background.

4) Make a distinction between line name and convoy name. I tried changing the background color slightly, but it may be difficult to understand. The background color of lineless convoy is a little dark.

Thank you for advising. Arigato thanks.  :)
I played with your patch. I think it is more useful.


Quote from: Ranran on May 09, 2020, 12:07:10 AM
Future improvement idea:
Added a symbol for whether it is a reverse route on it. For example, an up arrow and a down arrow. ↩ ↦

Certainly, it may be easier to see.
Title: Re: [patch]vehicles show line name or convoy name
Post by: jamespetts on May 16, 2020, 03:50:58 PM
Thank you all for your work on this: this looks very good. I have been testing Ranran's version of this. One or two small things need addressing before being incorporated.

First of all, the text "mouseover convoy nameplates" is too large to fit in the space between the horizontal scroll bars in the display settings dialogue. Secondly, even if I widen the dialogue, the rightmost horizontal scroll bar element remains in place, unlike that of the "Mouse-over convoy tooltips" selector, which dynamically moves to the right. Finally, I wonder whether it might be possible to set up a shortcut key for this? I am not immediately clear on whether this has been done or at least all but alteration of menuconf.tab done. In Pak128.Britain-Ex, the SHIFT+I key combination is currently free.

Apart from those small things, this does seem to be a very good enhancement: thank you all for your work on this.
Title: Re: [patch]vehicles show line name or convoy name
Post by: jamespetts on May 16, 2020, 11:10:51 PM
For the translation text, you might simply replace "nameplate" with "names", which should shorten it somewhat. I also suggest that the first letter of the first word of the text be a capital letter to match the others.

As to the shortcut key, I cannot get this to work; but do I need to download a modified menuconf.tab for this? Incidentally, merging this into the latest master caused merge conflicts in ja.tab again which you may need to resolve by re-instating the deleted part.
Title: Re: [patch]vehicles show line name or convoy name
Post by: jamespetts on May 17, 2020, 11:57:45 AM
Thank you very much for this - this is now confirmed working. I have merged and incorporated this and updated the English translation texts.

Unfortunately, there were still merge conflicts in the Japanese translation texts - I tried to resolve these as best as I could, but you may want to check this.
Title: Re: [patch]vehicles show line name or convoy name
Post by: jamespetts on May 18, 2020, 12:20:18 AM
Yes, it was the resolved conflicts one that I used.
Title: Re: [patch]vehicles show line name or convoy name
Post by: jamespetts on May 18, 2020, 11:08:35 AM
Now incorporated - thank you.
Title: Re: [patch]vehicles show line name or convoy name
Post by: jamespetts on June 16, 2020, 10:40:36 AM
Thank you - now incorporated.
Title: Re: [patch]vehicles show line name or convoy name
Post by: Vladki on June 16, 2020, 12:22:33 PM
Quote from: jamespetts on June 16, 2020, 10:40:36 AM
Thank you - now incorporated.

Ah accidentally we both backported the same fix... https://github.com/jamespetts/simutrans-extended/pull/151
So maybe there were some conficts trying to merge both
Title: Re: [patch]vehicles show line name or convoy name
Post by: jamespetts on June 16, 2020, 01:41:11 PM
The merge conflict was easy to resolve and has now been resolved - thank you both for your work on this.
Title: Re: [patch]vehicles show line name or convoy name
Post by: Vladki on June 16, 2020, 02:02:14 PM
Quote from: Ranran on June 16, 2020, 01:36:16 PMThe same applies to station name plates and alert tooltips. Did you try to fix it individually?
Station names were fixed too by the original patch.
Title: Re: [patch]vehicles show line name or convoy name
Post by: prissi on June 18, 2020, 02:26:46 AM
Since airplanes cannot handle slopes it should be save to remove this.