forked from OpenWF/SpaceNinjaServer
feat(webui): add relics via "add items" (#1066)
Closes #1062 Reviewed-on: OpenWF/SpaceNinjaServer#1066 Co-authored-by: Sainan <sainan@calamity.inc> Co-committed-by: Sainan <sainan@calamity.inc>
This commit is contained in:
parent
9158209059
commit
8a6f36a9b0
@ -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<TRelicQuality, string> = {
|
||||
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<string, ListedItem[]> = {};
|
||||
@ -108,11 +117,24 @@ const getItemListsController: RequestHandler = (req, response) => {
|
||||
name = name.split("|FISH_SIZE|").join(getString("/Lotus/Language/Fish/FishSizeSmallAbbrev", lang));
|
||||
}
|
||||
}
|
||||
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(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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user