Closed antal-k closed 8 months ago
I'm gonna make this changes:
export const formatSkinImage = (url, wear) => {
if (
[
"SFUI_InvTooltip_Wear_Amount_2",
"SFUI_InvTooltip_Wear_Amount_3",
].includes(wear)
) {
url = url.replace("_light_png", "_medium_png");
}
if (["SFUI_InvTooltip_Wear_Amount_4"].includes(wear)) {
url = url.replace("_light_png", "_heavy_png");
}
// Return the image as it is with _light_
return url;
};
My brain doesn't work on weekends to use regex.
Thank you very much ❤️
Generated file name:
sporty_gloves_sporty_heavy_blue_light_png.png
Original file name:
sporty_gloves_sporty_light_blue_light_png.png
Should be:
sporty_gloves_sporty_light_blue_heavy_png.png
Fix can be this way (not the nicest):