Changeset - r7543:fa81401cca0e
[Not reviewed]
master
0 4 0
rubidium - 17 years ago 2007-09-08 22:04:49
rubidium@openttd.org
(svn r11063) -Codechange: make it possible for people to view the loading indicators of everyone. Patch by SmatZ.
4 files changed with 12 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/economy.cpp
Show inline comments
 
@@ -1690,8 +1690,13 @@ static void LoadUnloadVehicle(Vehicle *v
 
		}
 
	}
 

	
 
	/* 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) {
src/lang/english.txt
Show inline comments
 
@@ -1112,6 +1112,9 @@ STR_CONFIG_PATCHES_RIGHT_MOUSE_BTN_EMU_O
 
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}
src/settings.cpp
Show inline comments
 
@@ -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),
 

	
 
	/***************************************************************************/
src/variables.h
Show inline comments
 
@@ -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
0 comments (0 inline, 0 general)