feat(webui): add relics to "add items" datalist
Some checks failed
Build / build (22) (push) Failing after 35s
Build / build (20) (push) Failing after 49s
Build / build (18) (push) Failing after 56s
Build / build (18) (pull_request) Failing after 40s
Build / build (20) (pull_request) Failing after 49s
Build / build (22) (pull_request) Failing after 55s
Some checks failed
Build / build (22) (push) Failing after 35s
Build / build (20) (push) Failing after 49s
Build / build (18) (push) Failing after 56s
Build / build (18) (pull_request) Failing after 40s
Build / build (20) (pull_request) Failing after 49s
Build / build (22) (pull_request) Failing after 55s
This commit is contained in:
parent
22456559d0
commit
3df18a9ffc
@ -6,12 +6,14 @@ import {
|
|||||||
ExportGear,
|
ExportGear,
|
||||||
ExportMisc,
|
ExportMisc,
|
||||||
ExportRecipes,
|
ExportRecipes,
|
||||||
|
ExportRelics,
|
||||||
ExportResources,
|
ExportResources,
|
||||||
ExportSentinels,
|
ExportSentinels,
|
||||||
ExportSyndicates,
|
ExportSyndicates,
|
||||||
ExportUpgrades,
|
ExportUpgrades,
|
||||||
ExportWarframes,
|
ExportWarframes,
|
||||||
ExportWeapons
|
ExportWeapons,
|
||||||
|
TRelicQuality
|
||||||
} from "warframe-public-export-plus";
|
} from "warframe-public-export-plus";
|
||||||
import archonCrystalUpgrades from "@/static/fixed_responses/webuiArchonCrystalUpgrades.json";
|
import archonCrystalUpgrades from "@/static/fixed_responses/webuiArchonCrystalUpgrades.json";
|
||||||
|
|
||||||
@ -23,6 +25,13 @@ interface ListedItem {
|
|||||||
badReason?: "starter" | "frivolous" | "notraw";
|
badReason?: "starter" | "frivolous" | "notraw";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const relicQualitySuffixes: Record<TRelicQuality, string> = {
|
||||||
|
"VPQ_BRONZE": "",
|
||||||
|
"VPQ_SILVER": " [Flawless]",
|
||||||
|
"VPQ_GOLD": " [Radiant]",
|
||||||
|
"VPQ_PLATINUM": " [Exceptional]",
|
||||||
|
}
|
||||||
|
|
||||||
const getItemListsController: RequestHandler = (req, response) => {
|
const getItemListsController: RequestHandler = (req, response) => {
|
||||||
const lang = getDict(typeof req.query.lang == "string" ? req.query.lang : "en");
|
const lang = getDict(typeof req.query.lang == "string" ? req.query.lang : "en");
|
||||||
const res: Record<string, ListedItem[]> = {};
|
const res: Record<string, ListedItem[]> = {};
|
||||||
@ -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)) {
|
for (const [uniqueName, item] of Object.entries(ExportGear)) {
|
||||||
res.miscitems.push({
|
res.miscitems.push({
|
||||||
uniqueName: "Consumables:" + uniqueName,
|
uniqueName: "Consumables:" + uniqueName,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user