Skip to content

Commit

Permalink
Fix Prime weapon component images
Browse files Browse the repository at this point in the history
  • Loading branch information
DaPigGuy committed Oct 27, 2024
1 parent e568006 commit e53bff8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/utils/items.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ const ingredientSuffixes = [
export const foundersItems = ["Excalibur Prime", "Skana Prime", "Lato Prime"];

export function getComponentImageUrl(itemName, componentName, generic, hash) {
return `https://cdn.warframestat.us/img/${(generic
? (componentName.includes(" Prime ") ? "prime-" : "") +
(ingredientSuffixes.find(suffix => componentName.endsWith(suffix)) ??
componentName.replace(`${itemName} `, ""))
: componentName + (hash ? "-" + hash : "")
return `https://cdn.warframestat.us/img/${(
(componentName.includes(" Prime") ? "prime-" : "") +
(generic
? ingredientSuffixes.find(suffix =>
componentName.endsWith(suffix)
) ?? componentName.replace(`${itemName} `, "")
: componentName + (hash ? "-" + hash : ""))
)
.split(" ")
.join("-")
Expand Down

0 comments on commit e53bff8

Please sign in to comment.