diff options
author | peter1138 <peter1138@openttd.org> | 2006-09-17 20:52:54 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-09-17 20:52:54 +0000 |
commit | 37e00dbef2e4efa25dd9ddb4ca227f4fffde924f (patch) | |
tree | 478bef1f4d2ad8896951a0c602acce70bee18a17 | |
parent | 4794012f37edeb176aae1cb6226b43a9e6044210 (diff) | |
download | openttd-37e00dbef2e4efa25dd9ddb4ca227f4fffde924f.tar.xz |
(svn r6474) - Add a patch option to control display of liveries, allowing none, your
own, or all companies.
-rw-r--r-- | lang/english.txt | 4 | ||||
-rw-r--r-- | settings.c | 1 | ||||
-rw-r--r-- | settings_gui.c | 1 | ||||
-rw-r--r-- | variables.h | 1 | ||||
-rw-r--r-- | vehicle.c | 2 |
5 files changed, 8 insertions, 1 deletions
diff --git a/lang/english.txt b/lang/english.txt index 467fc8523..0c21c9fa5 100644 --- a/lang/english.txt +++ b/lang/english.txt @@ -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} diff --git a/settings.c b/settings.c index 57a65821f..98dd32036 100644 --- a/settings.c +++ b/settings.c @@ -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 */ diff --git a/settings_gui.c b/settings_gui.c index eabe26899..15db71374 100644 --- a/settings_gui.c +++ b/settings_gui.c @@ -570,6 +570,7 @@ static const char *_patches_ui[] = { "population_in_label", "link_terraform_toolbar", "progress_update_interval", + "liveries", }; static const char *_patches_construction[] = { diff --git a/variables.h b/variables.h index 209bf134b..b7a1071cd 100644 --- a/variables.h +++ b/variables.h @@ -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 @@ -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: { |