From 22456559d021b04d030c988994a170a2ca5500b8 Mon Sep 17 00:00:00 2001 From: Sainan Date: Sun, 2 Mar 2025 12:01:49 +0100 Subject: [PATCH 1/3] fix(webui): don't show unreleased relics in add items --- src/controllers/custom/getItemListsController.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/controllers/custom/getItemListsController.ts b/src/controllers/custom/getItemListsController.ts index ce80d041..71e62d39 100644 --- a/src/controllers/custom/getItemListsController.ts +++ b/src/controllers/custom/getItemListsController.ts @@ -108,10 +108,12 @@ const getItemListsController: RequestHandler = (req, response) => { name = name.split("|FISH_SIZE|").join(getString("/Lotus/Language/Fish/FishSizeSmallAbbrev", lang)); } } - res.miscitems.push({ - uniqueName: item.productCategory + ":" + uniqueName, - name: name - }); + if (uniqueName.substr(0, 30) != "/Lotus/Types/Game/Projections/") { + res.miscitems.push({ + uniqueName: item.productCategory + ":" + uniqueName, + name: name + }); + } } for (const [uniqueName, item] of Object.entries(ExportGear)) { res.miscitems.push({ -- 2.47.2 From 3df18a9ffc742f2afad4c66100b08a1b67d8d234 Mon Sep 17 00:00:00 2001 From: Sainan Date: Sun, 2 Mar 2025 12:02:15 +0100 Subject: [PATCH 2/3] feat(webui): add relics to "add items" datalist --- .../custom/getItemListsController.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/controllers/custom/getItemListsController.ts b/src/controllers/custom/getItemListsController.ts index 71e62d39..bb101af9 100644 --- a/src/controllers/custom/getItemListsController.ts +++ b/src/controllers/custom/getItemListsController.ts @@ -6,12 +6,14 @@ import { ExportGear, ExportMisc, ExportRecipes, + ExportRelics, ExportResources, ExportSentinels, ExportSyndicates, ExportUpgrades, ExportWarframes, - ExportWeapons + ExportWeapons, + TRelicQuality } from "warframe-public-export-plus"; import archonCrystalUpgrades from "@/static/fixed_responses/webuiArchonCrystalUpgrades.json"; @@ -23,6 +25,13 @@ interface ListedItem { badReason?: "starter" | "frivolous" | "notraw"; } +const relicQualitySuffixes: Record = { + "VPQ_BRONZE": "", + "VPQ_SILVER": " [Flawless]", + "VPQ_GOLD": " [Radiant]", + "VPQ_PLATINUM": " [Exceptional]", +} + const getItemListsController: RequestHandler = (req, response) => { const lang = getDict(typeof req.query.lang == "string" ? req.query.lang : "en"); const res: Record = {}; @@ -115,6 +124,12 @@ const getItemListsController: RequestHandler = (req, response) => { }); } } + for (const [uniqueName, item] of Object.entries(ExportRelics)) { + res.miscitems.push({ + uniqueName: "MiscItems:" + uniqueName, + name: getString("/Lotus/Language/Relics/VoidProjectionName", lang).split("|ERA|").join(item.era).split("|CATEGORY|").join(item.category) + relicQualitySuffixes[item.quality] + }); + } for (const [uniqueName, item] of Object.entries(ExportGear)) { res.miscitems.push({ uniqueName: "Consumables:" + uniqueName, -- 2.47.2 From 7c6273d4cc5e06128b7b081b55d3fa92a2920709 Mon Sep 17 00:00:00 2001 From: Sainan Date: Sun, 2 Mar 2025 12:03:06 +0100 Subject: [PATCH 3/3] prettier --- .../custom/getItemListsController.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/controllers/custom/getItemListsController.ts b/src/controllers/custom/getItemListsController.ts index bb101af9..6534bf92 100644 --- a/src/controllers/custom/getItemListsController.ts +++ b/src/controllers/custom/getItemListsController.ts @@ -26,11 +26,11 @@ interface ListedItem { } const relicQualitySuffixes: Record = { - "VPQ_BRONZE": "", - "VPQ_SILVER": " [Flawless]", - "VPQ_GOLD": " [Radiant]", - "VPQ_PLATINUM": " [Exceptional]", -} + VPQ_BRONZE: "", + VPQ_SILVER: " [Flawless]", + VPQ_GOLD: " [Radiant]", + VPQ_PLATINUM: " [Exceptional]" +}; const getItemListsController: RequestHandler = (req, response) => { const lang = getDict(typeof req.query.lang == "string" ? req.query.lang : "en"); @@ -127,7 +127,12 @@ const getItemListsController: RequestHandler = (req, response) => { for (const [uniqueName, item] of Object.entries(ExportRelics)) { res.miscitems.push({ uniqueName: "MiscItems:" + uniqueName, - name: getString("/Lotus/Language/Relics/VoidProjectionName", lang).split("|ERA|").join(item.era).split("|CATEGORY|").join(item.category) + relicQualitySuffixes[item.quality] + name: + getString("/Lotus/Language/Relics/VoidProjectionName", lang) + .split("|ERA|") + .join(item.era) + .split("|CATEGORY|") + .join(item.category) + relicQualitySuffixes[item.quality] }); } for (const [uniqueName, item] of Object.entries(ExportGear)) { -- 2.47.2