(svn r6474) - Add a patch option to control display of liveries, allowing none, your

own, or all companies.
This commit is contained in:
peter1138 2006-09-17 20:52:54 +00:00
parent 4794012f37
commit 37e00dbef2
5 changed files with 8 additions and 1 deletions

View File

@ -1070,6 +1070,10 @@ STR_CONFIG_PATCHES_STATION_SPREAD :{LTBLUE}Max sta
STR_CONFIG_PATCHES_SERVICEATHELIPAD :{LTBLUE}Service helicopters at helipads automatically: {ORANGE}{STRING1}
STR_CONFIG_PATCHES_LINK_TERRAFORM_TOOLBAR :{LTBLUE}Link landscape toolbar to rail/road/water/airport toolbars: {ORANGE}{STRING1}
STR_CONFIG_PATCHES_REVERSE_SCROLLING :{LTBLUE}Reverse scroll direction: {ORANGE}{STRING1}
STR_CONFIG_PATCHES_LIVERIES :{LTBLUE}Show company liveries: {ORANGE}{STRING1}
STR_CONFIG_PATCHES_LIVERIES_NONE :None
STR_CONFIG_PATCHES_LIVERIES_OWN :Own company
STR_CONFIG_PATCHES_LIVERIES_ALL :All companies
STR_CONFIG_PATCHES_MAX_TRAINS :{LTBLUE}Max trains per player: {ORANGE}{STRING1}
STR_CONFIG_PATCHES_MAX_ROADVEH :{LTBLUE}Max road vehicles per player: {ORANGE}{STRING1}

View File

@ -1261,6 +1261,7 @@ const SettingDesc _patch_settings[] = {
SDT_VAR(Patches, map_x, SLE_UINT8, S, 0, 8, 6, 11, 0, STR_CONFIG_PATCHES_MAP_X, NULL),
SDT_VAR(Patches, map_y, SLE_UINT8, S, 0, 8, 6, 11, 0, STR_CONFIG_PATCHES_MAP_Y, NULL),
SDT_BOOL(Patches, link_terraform_toolbar, S, 0, false, STR_CONFIG_PATCHES_LINK_TERRAFORM_TOOLBAR,NULL),
SDT_VAR(Patches, liveries, SLE_UINT8, S,MS, 2, 0, 2, 0, STR_CONFIG_PATCHES_LIVERIES, RedrawScreen),
/***************************************************************************/
/* Construction section of the GUI-configure patches window */

View File

@ -570,6 +570,7 @@ static const char *_patches_ui[] = {
"population_in_label",
"link_terraform_toolbar",
"progress_update_interval",
"liveries",
};
static const char *_patches_construction[] = {

View File

@ -126,6 +126,7 @@ typedef struct Patches {
bool no_servicing_if_no_breakdowns; // dont send vehicles to depot when breakdowns are disabled
bool link_terraform_toolbar; // display terraform toolbar when displaying rail, road, water and airport toolbars
bool reverse_scroll; // Right-Click-Scrolling scrolls in the opposite direction
byte liveries; // Options for displaying company liveries, 0=none, 1=self, 2=all
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

View File

@ -2313,7 +2313,7 @@ static PalSpriteID GetEngineColourMap(EngineID engine_type, PlayerID player, Eng
/* The default livery is always available for use, but its in_use flag determines
* whether any _other_ liveries are in use. */
if (p->livery[LS_DEFAULT].in_use) {
if (p->livery[LS_DEFAULT].in_use && (_patches.liveries == 2 || (_patches.liveries == 1 && player == _local_player))) {
/* Determine the livery scheme to use */
switch (GetEngine(engine_type)->type) {
case VEH_Train: {