Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix banner definitions for several route networks [BUGFIX] #1173

Merged
merged 3 commits into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 32 additions & 21 deletions src/js/shield_defs.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ export function loadShields() {
// United States

// Interstate Highways
shields["US:I"] = {
const usInterstateShield = {
spriteBlank: ["shield_us_interstate_2", "shield_us_interstate_3"],
textLayout: textConstraint("southHalfEllipse"),
textColor: Color.shields.white,
Expand All @@ -649,6 +649,9 @@ export function loadShields() {
top: 6,
bottom: 5,
},
};
shields["US:I"] = {
...usInterstateShield,
bannerMap: {
"US:I:Alternate": ["ALT"],
"US:I:Express": ["EXPR"],
Expand All @@ -660,7 +663,7 @@ export function loadShields() {
};

shields["US:I:Business:Loop"] = {
...shields["US:I"],
...usInterstateShield,
spriteBlank: [
"shield_us_interstate_business_2",
"shield_us_interstate_business_3",
Expand Down Expand Up @@ -1459,7 +1462,7 @@ export function loadShields() {
};

// Maryland
shields["US:MD"] = {
const marylandShield = {
spriteBlank: ["shield_us_md_2", "shield_us_md_3"],
textColor: Color.shields.black,
padding: {
Expand All @@ -1468,14 +1471,18 @@ export function loadShields() {
top: 6,
bottom: 2,
},
};

shields["US:MD"] = {
...marylandShield,
bannerMap: {
"US:MD:Alternate": ["ALT"],
"US:MD:Bypass": ["BYP"],
},
};
shields["US:MD:Business"] = banneredShield(
{
...shields["US:MD"],
...marylandShield,
textColor: Color.shields.green,
colorLighten: Color.shields.green,
},
Expand Down Expand Up @@ -2099,7 +2106,7 @@ export function loadShields() {
);

// New York
shields["US:NY"] = {
const usNewYorkShield = {
spriteBlank: ["shield_us_ny_2", "shield_us_ny_3"],
textColor: Color.shields.black,
padding: {
Expand All @@ -2108,6 +2115,9 @@ export function loadShields() {
top: 5,
bottom: 5,
},
};
shields["US:NY"] = {
...usNewYorkShield,
bannerMap: {
"US:NY:Truck": ["TRK"],
},
Expand All @@ -2126,8 +2136,8 @@ export function loadShields() {
top: 3,
bottom: 3,
},
ref: "LOOP",
};
shields["US:NY:Inner_Loop"].ref = "LOOP";
shields["US:NY:Thruway"] = {
noref: {
spriteBlank: "shield_us_ny_thruway",
Expand All @@ -2139,7 +2149,7 @@ export function loadShields() {
},
};
shields["US:NY:Parkway"] = {
...shields["US:NY"],
...usNewYorkShield,
textColor: Color.shields.white,
colorLighten: Color.shields.white,
colorDarken: Color.shields.green,
Expand Down Expand Up @@ -2706,6 +2716,18 @@ export function loadShields() {
);

// Texas
const usTexasShapedShield = {
spriteBlank: "shield_us_tx_outline",
textColor: Color.shields.black,
textLayout: textConstraint("ellipse"),
padding: {
left: 3,
right: 0,
top: 7,
bottom: 10,
},
};

shields["US:TX"] = {
...roundedRectShield(Color.shields.white, Color.shields.black),
bannerMap: {
Expand All @@ -2719,22 +2741,14 @@ export function loadShields() {
},
};
shields["US:TX:FM"] = shields["US:TX:RM"] = {
spriteBlank: "shield_us_tx_outline",
textColor: Color.shields.black,
textLayout: textConstraint("ellipse"),
padding: {
left: 3,
right: 0,
top: 7,
bottom: 10,
},
...usTexasShapedShield,
bannerMap: {
"US:TX:FM:Business": ["BUS"],
},
};
shields["US:TX:Recreational"] = banneredShield(
{
...shields["US:TX:FM"],
...usTexasShapedShield,
textColor: Color.shields.brown,
colorLighten: Color.shields.brown,
},
Expand All @@ -2753,10 +2767,7 @@ export function loadShields() {
"US:TX:Loop:Express:Toll": ["EXPR", "LOOP"],
},
};
shields["US:TX:Toll"] = shields["US:TX:NTTA"] = roundedRectShield(
claysmalley marked this conversation as resolved.
Show resolved Hide resolved
Color.shields.blue,
Color.shields.white
);

shields["US:TX:CTRMA"] = {
...roundedRectShield(
Color.shields.blue,
Expand Down
Loading