diff options
-rw-r--r-- | src/economy.cpp | 9 | ||||
-rw-r--r-- | src/lang/english.txt | 3 | ||||
-rw-r--r-- | src/settings.cpp | 2 | ||||
-rw-r--r-- | src/variables.h | 2 |
4 files changed, 12 insertions, 4 deletions
diff --git a/src/economy.cpp b/src/economy.cpp index 8c5be601c..f0669be00 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1690,8 +1690,13 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left) } } - /* Calculate the loading indicator fill percent and display */ - if (_patches.loading_indicators && _game_mode != GM_MENU && v->owner == _local_player) { + /* Calculate the loading indicator fill percent and display + * In the Game Menu do not display indicators + * If _patches.loading_indicators == 2, show indicators (bool can be promoted to int as 0 or 1 - results in 2 > 0,1 ) + * if _patches.loading_indicators == 1, _local_player must be the owner or must be a spectator to show ind., so 1 > 0 + * if _patches.loading_indicators == 0, do not display indicators ... 0 is never greater than anything + */ + if (_game_mode != GM_MENU && (_patches.loading_indicators > (v->owner != _local_player && _local_player != PLAYER_SPECTATOR))) { StringID percent_up_down = STR_NULL; int percent = CalcPercentVehicleFilled(v, &percent_up_down); if (v->fill_percent_te_id == INVALID_TE_ID) { diff --git a/src/lang/english.txt b/src/lang/english.txt index 57a13f4ec..3cdf33a7f 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -1112,6 +1112,9 @@ STR_CONFIG_PATCHES_RIGHT_MOUSE_BTN_EMU_OFF :Off STR_CONFIG_PATCHES_PAUSE_ON_NEW_GAME :{LTBLUE}Automatically pause when starting a new game: {ORANGE}{STRING1} STR_CONFIG_PATCHES_ADVANCED_VEHICLE_LISTS :{LTBLUE}Use the advanced vehicle list: {ORANGE}{STRING1} STR_CONFIG_PATCHES_LOADING_INDICATORS :{LTBLUE}Use loading indicators: {ORANGE}{STRING1} +STR_CONFIG_PATCHES_LOADING_INDICATORS_OFF :Off +STR_CONFIG_PATCHES_LOADING_INDICATORS_OWN :Own company +STR_CONFIG_PATCHES_LOADING_INDICATORS_ALL :All companies STR_CONFIG_PATCHES_TIMETABLE_ALLOW :{LTBLUE}Enable timetabling for vehicles: {ORANGE}{STRING1} STR_CONFIG_PATCHES_TIMETABLE_IN_TICKS :{LTBLUE}Show timetable in ticks rather than days: {ORANGE}{STRING1} STR_CONFIG_PATCHES_DEFAULT_RAIL_TYPE :{LTBLUE}Default rail type (after new game/game load): {ORANGE}{STRING1} diff --git a/src/settings.cpp b/src/settings.cpp index 7a61d2404..b0a1eb33d 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1355,7 +1355,7 @@ const SettingDesc _patch_settings[] = { SDT_BOOL(Patches, pause_on_newgame, S, 0, false, STR_CONFIG_PATCHES_PAUSE_ON_NEW_GAME, NULL), SDT_BOOL(Patches, advanced_vehicle_list, S, 0, true, STR_CONFIG_PATCHES_ADVANCED_VEHICLE_LISTS, NULL), SDT_BOOL(Patches, timetable_in_ticks, S, 0, false, STR_CONFIG_PATCHES_TIMETABLE_IN_TICKS, NULL), - SDT_BOOL(Patches, loading_indicators, S, 0, true, STR_CONFIG_PATCHES_LOADING_INDICATORS, RedrawScreen), + SDT_VAR(Patches, loading_indicators, SLE_UINT8, S,MS, 1, 0, 2, 0, STR_CONFIG_PATCHES_LOADING_INDICATORS, RedrawScreen), SDT_VAR(Patches, default_rail_type, SLE_UINT8, S,MS, 4, 0, 6, 0, STR_CONFIG_PATCHES_DEFAULT_RAIL_TYPE, NULL), /***************************************************************************/ diff --git a/src/variables.h b/src/variables.h index 83b991574..1cc576075 100644 --- a/src/variables.h +++ b/src/variables.h @@ -130,7 +130,7 @@ struct Patches { byte liveries; // Options for displaying company liveries, 0=none, 1=self, 2=all bool prefer_teamchat; // Choose the chat message target with <ENTER>, true=all players, false=your team bool advanced_vehicle_list; // Use the "advanced" vehicle list - bool loading_indicators; // Show loading indicators + uint8 loading_indicators; // Show loading indicators uint8 default_rail_type; ///< The default rail type for the rail GUI uint8 toolbar_pos; // position of toolbars, 0=left, 1=center, 2=right |