The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: Ranran(retired) on December 09, 2018, 10:14:23 AM

Title: Bug: Inspection tool icon disappears from main menu bar in network mode
Post by: Ranran(retired) on December 09, 2018, 10:14:23 AM
Hi. The title tells everything.
The same symptoms can be confirmed with all pakset with Extended but this symptom can not be seen with standard.
The icon disappears but the shortcut key is available.
Title: Re: Bug: Inspection tool icon disappears from main menu bar in network mode
Post by: Ranran(retired) on December 20, 2018, 03:05:35 PM
I found the corresponding part from the code. It is in simtool.h.
Comparing this part with the standard's code, this one line has been added in extended. (simtool.h line 47)


image_id get_icon(player_t *player) const OVERRIDE { return (!env_t::networkmode || player->get_player_nr()==1) ? icon : IMG_EMPTY; }


It seems that Extended intentionally hide the inspection tool icon in the network game. (except for public player)
Is there any reason?
Title: Re: Bug: Inspection tool icon disappears from main menu bar in network mode
Post by: jamespetts on December 22, 2018, 11:50:06 PM
Thank you for that report and for finding the cause of this issue. I do not understand why this line of code was present; testing seems to show that it served no useful purpose, so I have removed it. This fixes the issue with the inspection tool being not visible in network mode (although it could always be selected by the keyboard shortcut "a").
Title: Re: Bug: Inspection tool icon disappears from main menu bar in network mode
Post by: Ranran(retired) on December 25, 2018, 12:27:26 PM
Inspection tool icon is now displayed in network mode. Thank you. :)