Skip to content

Commit

Permalink
refactoring and renaming similar shields for Mexico and Peru
Browse files Browse the repository at this point in the history
  • Loading branch information
whubsch committed Jan 7, 2025
1 parent d28a99e commit 1ed9377
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
File renamed without changes
File renamed without changes
30 changes: 16 additions & 14 deletions src/js/shield_defs.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,20 @@ export function loadShields() {
textHaloColor: Color.backgroundFill,
};

let escutcheonCrossbarShield = {
spriteBlank: [
"shield_escutcheon_crossbar_2",
"shield_escutcheon_crossbar_3",
],
textColor: Color.shields.black,
padding: {
left: 2,
right: 2,
top: 5.5,
bottom: 4.5,
},
};

// NORTH AMERICA
shields["GLCT"] = {
notext: true,
Expand Down Expand Up @@ -573,19 +587,7 @@ export function loadShields() {
"VER",
"YUC",
"ZAC",
].forEach(
(state) =>
(shields[`MX:${state}`] = {
spriteBlank: ["shield_mx_state_2", "shield_mx_state_3"],
textColor: Color.shields.black,
padding: {
left: 2,
right: 2,
top: 5.5,
bottom: 4.5,
},
})
);
].forEach((state) => (shields[`MX:${state}`] = escutcheonCrossbarShield));

// Ejes Viales (CDMX)
shields["MX:CDMX:EJE:CENTRAL"] = {
Expand Down Expand Up @@ -3200,7 +3202,7 @@ export function loadShields() {
shields[`PE:departmental:${department}`],
shields[`PE:rural:${department}`],
] = [
escutcheonDownShield(12, Color.shields.white, Color.shields.black),
escutcheonCrossbarShield,
pillShield(Color.shields.white, Color.shields.black),
])
);
Expand Down

0 comments on commit 1ed9377

Please sign in to comment.