From 21d93cae2fa8ba95863777418833e1b88cf5c4eb Mon Sep 17 00:00:00 2001 From: Sainan Date: Mon, 17 Mar 2025 15:03:29 +0100 Subject: [PATCH] fix(webui): unable to add relics --- src/controllers/custom/getItemListsController.ts | 16 +++++++++------- static/webui/script.js | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/controllers/custom/getItemListsController.ts b/src/controllers/custom/getItemListsController.ts index cfdde03d..af20ce13 100644 --- a/src/controllers/custom/getItemListsController.ts +++ b/src/controllers/custom/getItemListsController.ts @@ -192,14 +192,16 @@ const getItemListsController: RequestHandler = (req, response) => { }); } for (const [uniqueName, arcane] of Object.entries(ExportArcanes)) { - const mod: ListedItem = { - uniqueName, - name: getString(arcane.name, lang) - }; - if (arcane.isFrivolous) { - mod.badReason = "frivolous"; + if (uniqueName.substring(0, 18) != "/Lotus/Types/Game/") { + const mod: ListedItem = { + uniqueName, + name: getString(arcane.name, lang) + }; + if (arcane.isFrivolous) { + mod.badReason = "frivolous"; + } + res.mods.push(mod); } - res.mods.push(mod); } for (const [uniqueName, syndicate] of Object.entries(ExportSyndicates)) { res.Syndicates.push({ diff --git a/static/webui/script.js b/static/webui/script.js index 34d65389..90e389c2 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -230,7 +230,7 @@ function fetchItemList() { if (type == "Syndicates" && item.uniqueName.startsWith("RadioLegion")) { item.name += " (" + item.uniqueName + ")"; } - if (item.uniqueName.substr(0, 18) != "/Lotus/Types/Game/" && item.badReason != "notraw") { + if (item.badReason != "notraw") { const option = document.createElement("option"); option.setAttribute("data-key", item.uniqueName); option.value = item.name; -- 2.47.2