From 7b866a2f71e706ffbf1a4063c0ba879e1360102e Mon Sep 17 00:00:00 2001 From: Sainan Date: Mon, 17 Mar 2025 10:06:25 -0700 Subject: [PATCH] fix(webui): unable to add relics (#1222) Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1222 --- 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 f66d6c2a..a506d19d 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;