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
 
@@ -1687,14 +1687,19 @@ static void LoadUnloadVehicle(Vehicle *v
 
		if (overhang > 0) {
 
			unloading_time <<= 1;
 
			unloading_time += (overhang * unloading_time) / 8;
 
		}
 
	}
 

	
 
	/* 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) {
 
			v->fill_percent_te_id = ShowFillingPercent(v->x_pos, v->y_pos, v->z_pos + 20, percent, percent_up_down);
 
		} else {
 
			UpdateFillingPercent(v->fill_percent_te_id, percent, percent_up_down);
src/lang/english.txt
Show inline comments
 
@@ -1109,12 +1109,15 @@ STR_CONFIG_PATCHES_RIGHT_MOUSE_BTN_EMU_C
 
STR_CONFIG_PATCHES_RIGHT_MOUSE_BTN_EMU_CONTROL                  :Control-click
 
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}
 
STR_CONFIG_PATCHES_DEFAULT_RAIL_TYPE_RAIL                       :Normal Rail
 
STR_CONFIG_PATCHES_DEFAULT_RAIL_TYPE_ELRAIL                     :Electrified Rail
 
STR_CONFIG_PATCHES_DEFAULT_RAIL_TYPE_MONORAIL                   :Monorail
src/settings.cpp
Show inline comments
 
@@ -1352,13 +1352,13 @@ const SettingDesc _patch_settings[] = {
 
	/* We might need to emulate a right mouse button on mac */
 
	SDT_VAR(Patches,right_mouse_btn_emulation,SLE_UINT8,S,MS,0, 0, 2, 0, STR_CONFIG_PATCHES_RIGHT_MOUSE_BTN_EMU,   NULL),
 
#endif
 
	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),
 

	
 
	/***************************************************************************/
 
	/* Construction section of the GUI-configure patches window */
 
	SDT_BOOL(Patches, build_on_slopes,               0, 0,  true,        STR_CONFIG_PATCHES_BUILDONSLOPES,       NULL),
 
	SDT_BOOL(Patches, extra_dynamite,                0, 0, false,        STR_CONFIG_PATCHES_EXTRADYNAMITE,       NULL),
src/variables.h
Show inline comments
 
@@ -127,13 +127,13 @@ struct Patches {
 
	bool smooth_scroll;                 ///< Smooth scroll viewports
 
	bool disable_elrails;               // when true, the elrails are disabled
 
	bool measure_tooltip;               // Show a permanent tooltip when dragging tools
 
	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
 
	uint8 window_snap_radius;           // Windows snap at each other if closer than this
 

	
 
	bool always_build_infrastructure;   ///< Always allow building of infrastructure, even when you do not have the vehicles for it
0 comments (0 inline, 0 general)