diff --git a/src/controllers/custom/getItemListsController.ts b/src/controllers/custom/getItemListsController.ts index 04f3568d..fea67d7a 100644 --- a/src/controllers/custom/getItemListsController.ts +++ b/src/controllers/custom/getItemListsController.ts @@ -1,7 +1,7 @@ import { RequestHandler } from "express"; -import { MinItem, MinWeapon, warframes, items, getEnglishString } from "@/src/services/itemDataService"; +import { MinItem, MinWeapon, items, getEnglishString } from "@/src/services/itemDataService"; import badItems from "@/static/json/exclude-mods.json"; -import { ExportArcanes, ExportWeapons } from "warframe-public-export-plus"; +import { ExportArcanes, ExportWarframes, ExportWeapons } from "warframe-public-export-plus"; interface ListedItem { uniqueName: string; @@ -28,7 +28,14 @@ const getItemListsController: RequestHandler = (_req, res) => { }); } res.json({ - warframes: reduceItems(warframes), + warframes: Object.entries(ExportWarframes) + .filter(([_uniqueName, warframe]) => warframe.productCategory == "Suits") + .map(([uniqueName, warframe]) => { + return { + uniqueName, + name: getEnglishString(warframe.name) + }; + }), weapons: Object.entries(ExportWeapons) .filter(([_uniqueName, weapon]) => weapon.productCategory !== "OperatorAmps" && weapon.totalDamage !== 0) .map(([uniqueName, weapon]) => { diff --git a/src/services/itemDataService.ts b/src/services/itemDataService.ts index c755336d..694a766f 100644 --- a/src/services/itemDataService.ts +++ b/src/services/itemDataService.ts @@ -15,16 +15,6 @@ export type MinWarframe = Omit; export type MinWeapon = Omit; export type MinItem = Omit; -export const warframes: MinWarframe[] = Array.from(new Items({ category: ["Warframes"] }) as Warframe[]) - .filter(item => { - return item.uniqueName.substring(0, 30) != "/Lotus/Powersuits/EntratiMech/"; - }) - .map(item => { - const next = { ...item }; - delete next.patchlogs; - return next; - }); - export type WeaponTypeInternal = | "LongGuns" | "Pistols"