diff --git a/src/js/shield_defs.js b/src/js/shield_defs.js index c57e86cb3..42fb66dff 100644 --- a/src/js/shield_defs.js +++ b/src/js/shield_defs.js @@ -105,12 +105,33 @@ export function loadShields() { // NORTH AMERICA shields["GLCT"] = { notext: true, + overrideByRef: { + LECT: { + spriteBlank: "shield_glct_lect", + }, + LHCT: { + spriteBlank: "shield_glct_lhct", + }, + LMCT: { + spriteBlank: "shield_glct_lmct", + colorLighten: Color.shields.green, + }, + LSCT: { + spriteBlank: "shield_glct_lsct", + }, + }, + }; + shields["GLCT:Loop"] = { + ...shields["GLCT"], + banners: ["LOOP"], + bannerTextColor: Color.shields.brown, + overrideByRef: { + LMCT: { + spriteBlank: "shield_glct_lmct", + colorLighten: Color.shields.brown, + }, + }, }; - shields["GLCT:Loop"] = banneredShield( - shields["GLCT"], - ["LOOP"], - Color.shields.brown - ); // Canada shields["CA:transcanada"] = { @@ -214,6 +235,50 @@ export function loadShields() { ); shields["CA:NS:S"] = { notext: true, + overrideByName: { + "A. Murray MacKay Bridge": { + spriteBlank: "shield_ca_ns_s_mkb", + }, + "Angus L. MacDonald Bridge": { + spriteBlank: "shield_ca_ns_s_mdb", + }, + "Bras d'Or Lakes Scenic Drive": { + spriteBlank: "shield_ca_ns_s_bdolsd", + }, + "Ceilidh Trail": { + spriteBlank: "shield_ca_ns_s_cet", + }, + "Cabot Trail": { + spriteBlank: "shield_ca_ns_s_ct", + }, + "Digby Neck and Islands Scenic Drive": { + spriteBlank: "shield_ca_ns_s_dnisd", + }, + "Evangeline Trail": { + spriteBlank: "shield_ca_ns_s_et", + }, + "Fleur-de-lis Trail": { + spriteBlank: "shield_ca_ns_s_fdlt", + }, + "Glooscap Trail": { + spriteBlank: "shield_ca_ns_s_gt", + }, + "Kejimkujik Scenic Drive": { + spriteBlank: "shield_ca_ns_s_ksd", + }, + "Lighthouse Route": { + spriteBlank: "shield_ca_ns_s_lr", + }, + "Marine Drive": { + spriteBlank: "shield_ca_ns_s_md", + }, + "Marconi Trail": { + spriteBlank: "shield_ca_ns_s_mt", + }, + "Sunrise Trail": { + spriteBlank: "shield_ca_ns_s_st", + }, + }, }; // Northwest Territories @@ -238,6 +303,13 @@ export function loadShields() { top: 6, bottom: 2, }, + overrideByRef: { + QEW: { + textColor: Color.shields.blue, + colorLighten: Color.shields.blue, + colorDarken: Color.shields.yellow, + }, + }, }; shields["CA:ON:primary:Toll"] = { ...shields["CA:ON:primary"], @@ -445,7 +517,16 @@ export function loadShields() { ); // Yukon - shields["CA:YT"] = roundedRectShield(Color.shields.white, Color.shields.red); + shields["CA:YT"] = { + ...roundedRectShield(Color.shields.white, Color.shields.red), + overrideByRef: { + 2: roundedRectShield(Color.shields.white, "#ce9d00"), + 3: roundedRectShield(Color.shields.white, "#ce9d00"), + 5: roundedRectShield(Color.shields.white, Color.shields.blue), + 6: roundedRectShield(Color.shields.white, Color.shields.green), + 11: roundedRectShield(Color.shields.white, Color.shields.blue), + }, + }; // Haiti shields["HT:RN-road"] = shields["HT:RD-road"] = roundedRectShield( @@ -715,6 +796,13 @@ export function loadShields() { top: 4, bottom: 5, }, + overrideByRef: { + 980: { + textColor: Color.shields.white, + colorLighten: Color.shields.white, + colorDarken: Color.shields.blue, + }, + }, }; [ "Calhoun", @@ -910,9 +998,13 @@ export function loadShields() { Color.shields.white, Color.shields.black ); - shields["US:CT:Parkway"] = { notext: true, + overrideByName: { + "Merritt Parkway": { + spriteBlank: "shield_us_ct_parkway_merritt", + }, + }, }; // Washington, D.C. @@ -1000,6 +1092,16 @@ export function loadShields() { "US:GA:Business": ["BUS"], "US:GA:Alternate": ["ALT"], }, + overrideByRef: { + 515: { + textColor: Color.shields.blue, + colorLighten: Color.shields.blue, + }, + 520: { + textColor: Color.shields.green, + colorLighten: Color.shields.green, + }, + }, }; // Guam @@ -1177,6 +1279,15 @@ export function loadShields() { top: 2, bottom: 6, }, + refsByName: { + "Audubon Parkway": "AU", + "Bluegrass Parkway": "BG", + "Cumberland Parkway": "LN", + "Hal Rogers Parkway": "HR", + "Mountain Parkway": "MP", + "Purchase Parkway": "JC", + "Western Kentucky Parkway": "WK", + }, }; // Louisiana @@ -1284,6 +1395,15 @@ export function loadShields() { "US:MI:Business": ["BUS"], "US:MI:Connector": ["CONN"], }, + overrideByRef = { + 185: diamondShield( + Color.shields.brown, + Color.shields.white, + Color.shields.white, + 0, + 24 + ), + }, }; ["CR", "Benzie", "Gogebic", "Kalkaska", "Montcalm", "Roscommon"].forEach( (county) => @@ -1503,7 +1623,16 @@ export function loadShields() { Color.shields.brown, Color.shields.white ); - shields["US:MO:Taney:Branson"] = {}; // See ref-specific cases below + shields["US:MO:Taney:Branson"] = { + overrideByRef: { + "Red Route": bransonRouteShield(Color.shields.red, Color.shields.white), + "Yellow Route": bransonRouteShield( + Color.shields.yellow, + Color.shields.green + ), + "Blue Route": bransonRouteShield(Color.shields.blue, Color.shields.white), + }, + }; // Northern Mariana Islands shields["US:MP"] = { @@ -1698,6 +1827,16 @@ export function loadShields() { }; shields["US:NH:Turnpike"] = { notext: true, + overrideByName: { + "Everett Turnpike": { + spriteBlank: "shield_us_nh_turnpike", + colorLighten: Color.shields.green, + }, + "Spaulding Turnpike": { + spriteBlank: "shield_us_nh_turnpike", + colorLighten: Color.shields.blue, + }, + }, }; // New Jersey @@ -1896,6 +2035,18 @@ export function loadShields() { textColor: Color.shields.white, colorLighten: Color.shields.white, colorDarken: Color.shields.green, + refsByName: { + "Bear Mountain State Parkway": "BMP", + "Bronx River Parkway": "BRP", + "Cross County Parkway": "CCP", + "Hutchinson River Parkway": "HRP", + "Korean War Veterans Parkway": "KWVP", + "Mosholu Parkway": "MP", + "Niagara Scenic Parkway": "NSP", + "Saw Mill River Parkway": "SMP", + "Sprain Brook Parkway": "SBP", + "Taconic State Parkway": "TSP", + }, }; shields["US:NY:Parkway:LI"] = { spriteBlank: "shield_us_ny_parkway_li", @@ -2272,7 +2423,16 @@ export function loadShields() { colorDarken: Color.shields.green, }, }; - shields["US:PA:Allegheny:Belt"] = {}; // See ref-specific cases below + shields["US:PA:Allegheny:Belt"] = { + overrideByRef: { + "Red Belt": paBeltShield(Color.shields.red, Color.shields.black), + "Orange Belt": paBeltShield(Color.shields.orange, Color.shields.black), + "Yellow Belt": paBeltShield(Color.shields.yellow, Color.shields.black), + "Green Belt": paBeltShield(Color.shields.green, Color.shields.white), + "Blue Belt": paBeltShield(Color.shields.blue, Color.shields.white), + "Purple Belt": paBeltShield(Color.shields.purple, Color.shields.white), + }, + }; // Puerto Rico shields["US:PR:primary"] = escutcheonDownShield( @@ -2514,17 +2674,21 @@ export function loadShields() { top: 2, bottom: 8, }, + refsByName: { + "Fort Bend Parkway Toll Road": "FBP", + "Fort Bend Westpark Tollway": "WPT", + }, + }; + shields["US:TX:Harris:HCTRA"] = { + ...pentagonUpShield(3, 15, Color.shields.purple, Color.shields.yellow), + refsByName: { + "Sam Houston Tollway": "SHT", + "Fort Bend Toll Road": "FBTR", + "Hardy Toll Road": "HTR", + "Tomball Tollway": "TBT", + "Westpark Tollway": "WPT", + }, }; - shields["US:TX:Harris:HCTRA"] = pentagonUpShield( - 3, - 15, - Color.shields.purple, - Color.shields.yellow, - Color.shields.yellow, - 2, - 0, - 28 - ); // Texas county roads [ @@ -3807,191 +3971,6 @@ export function loadShields() { ); shields["NZ:WRR"] = circleShield(Color.shields.white, Color.shields.black); - // Ref-specific cases. Each entry should be documented in CONTRIBUTE.md - - shields["CA:NS:S"].overrideByName = { - "A. Murray MacKay Bridge": { - spriteBlank: "shield_ca_ns_s_mkb", - }, - "Angus L. MacDonald Bridge": { - spriteBlank: "shield_ca_ns_s_mdb", - }, - "Bras d'Or Lakes Scenic Drive": { - spriteBlank: "shield_ca_ns_s_bdolsd", - }, - "Ceilidh Trail": { - spriteBlank: "shield_ca_ns_s_cet", - }, - "Cabot Trail": { - spriteBlank: "shield_ca_ns_s_ct", - }, - "Digby Neck and Islands Scenic Drive": { - spriteBlank: "shield_ca_ns_s_dnisd", - }, - "Evangeline Trail": { - spriteBlank: "shield_ca_ns_s_et", - }, - "Fleur-de-lis Trail": { - spriteBlank: "shield_ca_ns_s_fdlt", - }, - "Glooscap Trail": { - spriteBlank: "shield_ca_ns_s_gt", - }, - "Kejimkujik Scenic Drive": { - spriteBlank: "shield_ca_ns_s_ksd", - }, - "Lighthouse Route": { - spriteBlank: "shield_ca_ns_s_lr", - }, - "Marine Drive": { - spriteBlank: "shield_ca_ns_s_md", - }, - "Marconi Trail": { - spriteBlank: "shield_ca_ns_s_mt", - }, - "Sunrise Trail": { - spriteBlank: "shield_ca_ns_s_st", - }, - }; - - shields["CA:ON:primary"].overrideByRef = { - QEW: { - textColor: Color.shields.blue, - colorLighten: Color.shields.blue, - colorDarken: Color.shields.yellow, - }, - }; - - shields["CA:YT"].overrideByRef = { - 2: roundedRectShield(Color.shields.white, "#ce9d00"), - 3: roundedRectShield(Color.shields.white, "#ce9d00"), - 5: roundedRectShield(Color.shields.white, Color.shields.blue), - 6: roundedRectShield(Color.shields.white, Color.shields.green), - 11: roundedRectShield(Color.shields.white, Color.shields.blue), - }; - - shields["US:AR"].overrideByRef = { - 980: { - textColor: Color.shields.white, - colorLighten: Color.shields.white, - colorDarken: Color.shields.blue, - }, - }; - - shields["US:GA"].overrideByRef = { - 515: { - textColor: Color.shields.blue, - colorLighten: Color.shields.blue, - }, - 520: { - textColor: Color.shields.green, - colorLighten: Color.shields.green, - }, - }; - - shields["US:KY:Parkway"].refsByName = { - "Audubon Parkway": "AU", - "Bluegrass Parkway": "BG", - "Cumberland Parkway": "LN", - "Hal Rogers Parkway": "HR", - "Mountain Parkway": "MP", - "Purchase Parkway": "JC", - "Western Kentucky Parkway": "WK", - }; - - shields["US:CT:Parkway"].overrideByName = { - "Merritt Parkway": { - spriteBlank: "shield_us_ct_parkway_merritt", - }, - }; - - shields["US:MI"].overrideByRef = { - 185: diamondShield( - Color.shields.brown, - Color.shields.white, - Color.shields.white, - 0, - 24 - ), - }; - - shields["US:MO:Taney:Branson"].overrideByRef = { - "Red Route": bransonRouteShield(Color.shields.red, Color.shields.white), - "Yellow Route": bransonRouteShield( - Color.shields.yellow, - Color.shields.green - ), - "Blue Route": bransonRouteShield(Color.shields.blue, Color.shields.white), - }; - - shields["US:NH:Turnpike"].overrideByName = { - "Everett Turnpike": { - spriteBlank: "shield_us_nh_turnpike", - colorLighten: "#006747", - }, - "Spaulding Turnpike": { - spriteBlank: "shield_us_nh_turnpike", - colorLighten: "#003F87", - }, - }; - - shields["US:NY:Parkway"].refsByName = { - "Bear Mountain State Parkway": "BMP", - "Bronx River Parkway": "BRP", - "Cross County Parkway": "CCP", - "Hutchinson River Parkway": "HRP", - "Korean War Veterans Parkway": "KWVP", - "Mosholu Parkway": "MP", - "Niagara Scenic Parkway": "NSP", - "Saw Mill River Parkway": "SMP", - "Sprain Brook Parkway": "SBP", - "Taconic State Parkway": "TSP", - }; - - shields["US:PA:Allegheny:Belt"].overrideByRef = { - "Red Belt": paBeltShield(Color.shields.red, Color.shields.black), - "Orange Belt": paBeltShield(Color.shields.orange, Color.shields.black), - "Yellow Belt": paBeltShield(Color.shields.yellow, Color.shields.black), - "Green Belt": paBeltShield(Color.shields.green, Color.shields.white), - "Blue Belt": paBeltShield(Color.shields.blue, Color.shields.white), - "Purple Belt": paBeltShield(Color.shields.purple, Color.shields.white), - }; - - shields["US:TX:Fort_Bend:FBCTRA"].refsByName = { - "Fort Bend Parkway Toll Road": "FBP", - "Fort Bend Westpark Tollway": "WPT", - }; - shields["US:TX:Harris:HCTRA"].refsByName = { - "Sam Houston Tollway": "SHT", - "Fort Bend Toll Road": "FBTR", - "Hardy Toll Road": "HTR", - "Tomball Tollway": "TBT", - "Westpark Tollway": "WPT", - }; - - shields["GLCT"].overrideByRef = { - LECT: { - spriteBlank: "shield_glct_lect", - }, - LHCT: { - spriteBlank: "shield_glct_lhct", - }, - LMCT: { - spriteBlank: "shield_glct_lmct", - colorLighten: Color.shields.green, - }, - LSCT: { - spriteBlank: "shield_glct_lsct", - }, - }; - - shields["GLCT:Loop"].overrideByRef = { - LMCT: { - spriteBlank: "shield_glct_lmct", - colorLighten: Color.shields.brown, - }, - }; - return { networks: shields, options: {