Mercurial > hg > openttd
changeset 4616:cef7b22ec4f6 draft
(svn r6474) - Add a patch option to control display of liveries, allowing none, your
own, or all companies.
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Sun, 17 Sep 2006 20:52:54 +0000 |
parents | 400bd6ca1123 |
children | 2a1e78676c84 |
files | lang/english.txt settings.c settings_gui.c variables.h vehicle.c |
diffstat | 5 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lang/english.txt +++ b/lang/english.txt @@ -1070,6 +1070,10 @@ 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}
--- a/settings.c +++ b/settings.c @@ -1261,6 +1261,7 @@ 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 */
--- a/settings_gui.c +++ b/settings_gui.c @@ -570,6 +570,7 @@ "population_in_label", "link_terraform_toolbar", "progress_update_interval", + "liveries", }; static const char *_patches_construction[] = {
--- a/variables.h +++ b/variables.h @@ -126,6 +126,7 @@ 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
--- a/vehicle.c +++ b/vehicle.c @@ -2313,7 +2313,7 @@ /* 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: {