Skip to content

Commit

Permalink
Merge branch 'main' into claysmalley-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeLonewolf authored Dec 5, 2024
2 parents 822e2a4 + a0c86a3 commit 33a084a
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 34 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ jobs:
build-preview:
runs-on: ubuntu-latest
steps:
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Checkout Main Branch 🛎️
uses: actions/checkout@v4
with:
Expand All @@ -31,6 +27,10 @@ jobs:
uses: actions/checkout@v4
with:
path: pr-branch
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: pr-branch/package.json
- name: Install and Build Main Branch 🔧
run: |
npm ci --include=dev
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Use Node.js 18.x
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version-file: package.json
- name: Install and Build 🔧
# TODO: when we move shieldlib to its own repo, move shieldlib docs CI also
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
# This is important to fetch the changes to the previous commit
fetch-depth: 0

- name: Set up Node.js
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18" # Specify the Node.js version
node-version-file: package.json

- name: Install dependencies
run: npm install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-build-macos-13.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Use Node.js 18.x
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version-file: package.json
- name: Build Shield Library 🛡️
run: |
cd shieldlib
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Use Node.js 18.x
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version-file: package.json
- name: Build Shield Library 🛡️
run: |
cd shieldlib
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@
},
"engines": {
"npm": ">=8.3.0",
"node": ">=18"
"node": ">=18 <=20"
}
}
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 @@ -1460,7 +1463,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 @@ -1469,14 +1472,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 @@ -2100,7 +2107,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 @@ -2109,6 +2116,9 @@ export function loadShields() {
top: 5,
bottom: 5,
},
};
shields["US:NY"] = {
...usNewYorkShield,
bannerMap: {
"US:NY:Truck": ["TRK"],
},
Expand All @@ -2127,8 +2137,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 @@ -2140,7 +2150,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 @@ -2707,6 +2717,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 @@ -2720,22 +2742,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 @@ -2754,10 +2768,7 @@ export function loadShields() {
"US:TX:Loop:Express:Toll": ["EXPR", "LOOP"],
},
};
shields["US:TX:Toll"] = shields["US:TX:NTTA"] = roundedRectShield(
Color.shields.blue,
Color.shields.white
);

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

0 comments on commit 33a084a

Please sign in to comment.