(svn r11063) -Codechange: make it possible for people to view the loading indicators of everyone. Patch by SmatZ.

This commit is contained in:
rubidium 2007-09-08 22:04:49 +00:00
parent 814583f2a6
commit 3243b07542
4 changed files with 12 additions and 4 deletions

View File

@ -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) {

View File

@ -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}

View File

@ -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),
/***************************************************************************/

View File

@ -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