chore: update PE+ #2769

Merged
Sainan merged 2 commits from pe+87 into main 2025-09-11 01:10:24 -07:00
8 changed files with 32 additions and 17 deletions

8
package-lock.json generated
View File

@ -17,7 +17,7 @@
"morgan": "^1.10.0", "morgan": "^1.10.0",
"ncp": "^2.0.0", "ncp": "^2.0.0",
"undici": "^7.10.0", "undici": "^7.10.0",
"warframe-public-export-plus": "^0.5.86", "warframe-public-export-plus": "^0.5.87",
"warframe-riven-info": "^0.1.2", "warframe-riven-info": "^0.1.2",
"winston": "^3.17.0", "winston": "^3.17.0",
"winston-daily-rotate-file": "^5.0.0", "winston-daily-rotate-file": "^5.0.0",
@ -5532,9 +5532,9 @@
} }
}, },
"node_modules/warframe-public-export-plus": { "node_modules/warframe-public-export-plus": {
"version": "0.5.86", "version": "0.5.87",
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.86.tgz", "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.87.tgz",
"integrity": "sha512-tWJudKs4WdjFNiF6ipav9md3sboPXJFvSItTfSmT9ko+Xgg1QP75vS/qPsuPw67pqzMaSnAbHpEzNn/rZ4mCug==" "integrity": "sha512-pWDU3Df3fcEgYn42NNZb2XFOs5AdCIqFF/t9fU7VLpokBWjFzZgLz3O4gILssiUrwB4KCkvnjHi3BivgzJuv6g=="
}, },
"node_modules/warframe-riven-info": { "node_modules/warframe-riven-info": {
"version": "0.1.2", "version": "0.1.2",

View File

@ -35,7 +35,7 @@
"morgan": "^1.10.0", "morgan": "^1.10.0",
"ncp": "^2.0.0", "ncp": "^2.0.0",
"undici": "^7.10.0", "undici": "^7.10.0",
"warframe-public-export-plus": "^0.5.86", "warframe-public-export-plus": "^0.5.87",
"warframe-riven-info": "^0.1.2", "warframe-riven-info": "^0.1.2",
"winston": "^3.17.0", "winston": "^3.17.0",
"winston-daily-rotate-file": "^5.0.0", "winston-daily-rotate-file": "^5.0.0",

View File

@ -10,7 +10,7 @@ import type {
IMiscItem IMiscItem
} from "../../types/inventoryTypes/inventoryTypes.ts"; } from "../../types/inventoryTypes/inventoryTypes.ts";
import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts"; import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts";
import { ExportMisc } from "warframe-public-export-plus"; import { ExportResources } from "warframe-public-export-plus";
import { getRecipe } from "../../services/itemDataService.ts"; import { getRecipe } from "../../services/itemDataService.ts";
import { toMongoDate, version_compare } from "../../helpers/inventoryHelpers.ts"; import { toMongoDate, version_compare } from "../../helpers/inventoryHelpers.ts";
import { logger } from "../../utils/logger.ts"; import { logger } from "../../utils/logger.ts";
@ -146,7 +146,7 @@ export const infestedFoundryController: RequestHandler = async (req, res) => {
const currentUnixSeconds = Math.trunc(Date.now() / 1000); const currentUnixSeconds = Math.trunc(Date.now() / 1000);
for (const contribution of request.ResourceContributions) { for (const contribution of request.ResourceContributions) {
const snack = ExportMisc.helminthSnacks[contribution.ItemType]; const snack = ExportResources[contribution.ItemType].helminthSnack!;
// tally items for removal // tally items for removal
const change = miscItemChanges.find(x => x.ItemType == contribution.ItemType); const change = miscItemChanges.find(x => x.ItemType == contribution.ItemType);

View File

@ -1,11 +1,11 @@
import { applyClientEquipmentUpdates, getInventory } from "../../services/inventoryService.ts"; import { applyClientEquipmentUpdates, getInventory } from "../../services/inventoryService.ts";
import { getMaxLevelCap } from "../../services/itemDataService.ts";
import { getAccountIdForRequest } from "../../services/loginService.ts"; import { getAccountIdForRequest } from "../../services/loginService.ts";
import { broadcastInventoryUpdate } from "../../services/wsService.ts"; import { broadcastInventoryUpdate } from "../../services/wsService.ts";
import type { IOid } from "../../types/commonTypes.ts"; import type { IOid } from "../../types/commonTypes.ts";
import type { IEquipmentClient } from "../../types/equipmentTypes.ts"; import type { IEquipmentClient } from "../../types/equipmentTypes.ts";
import type { TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes.ts";
import type { RequestHandler } from "express"; import type { RequestHandler } from "express";
import { ExportMisc } from "warframe-public-export-plus";
export const addXpController: RequestHandler = async (req, res) => { export const addXpController: RequestHandler = async (req, res) => {
const accountId = await getAccountIdForRequest(req); const accountId = await getAccountIdForRequest(req);
@ -15,7 +15,7 @@ export const addXpController: RequestHandler = async (req, res) => {
for (const clientItem of gear) { for (const clientItem of gear) {
const dbItem = inventory[category as TEquipmentKey].id((clientItem.ItemId as IOid).$oid); const dbItem = inventory[category as TEquipmentKey].id((clientItem.ItemId as IOid).$oid);
if (dbItem) { if (dbItem) {
if (dbItem.ItemType in ExportMisc.uniqueLevelCaps) { if (getMaxLevelCap(dbItem.ItemType) > 30) {
if ((dbItem.Polarized ?? 0) < 5) { if ((dbItem.Polarized ?? 0) < 5) {
dbItem.Polarized = 5; dbItem.Polarized = 5;
} }

View File

@ -12,7 +12,6 @@ import {
ExportFactions, ExportFactions,
ExportGear, ExportGear,
ExportKeys, ExportKeys,
ExportMisc,
ExportRailjackWeapons, ExportRailjackWeapons,
ExportRecipes, ExportRecipes,
ExportRelics, ExportRelics,
@ -80,7 +79,7 @@ const toTitleCase = (str: string): string => {
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: ItemLists = { const res: ItemLists = {
uniqueLevelCaps: ExportMisc.uniqueLevelCaps, uniqueLevelCaps: {},
Suits: [], Suits: [],
LongGuns: [], LongGuns: [],
Melee: [], Melee: [],
@ -147,6 +146,9 @@ const getItemListsController: RequestHandler = (req, response) => {
name: getString(ability.name || uniqueName, lang) name: getString(ability.name || uniqueName, lang)
}); });
}); });
if (item.maxLevelCap) {
res.uniqueLevelCaps[uniqueName] = item.maxLevelCap;
}
} }
for (const [uniqueName, item] of Object.entries(ExportSentinels)) { for (const [uniqueName, item] of Object.entries(ExportSentinels)) {
if (item.productCategory == "Sentinels" || item.productCategory == "KubrowPets") { if (item.productCategory == "Sentinels" || item.productCategory == "KubrowPets") {
@ -196,6 +198,9 @@ const getItemListsController: RequestHandler = (req, response) => {
name: getString(item.name, lang) name: getString(item.name, lang)
}); });
} }
if (item.maxLevelCap) {
res.uniqueLevelCaps[uniqueName] = item.maxLevelCap;
}
} }
for (const [uniqueName, item] of Object.entries(ExportResources)) { for (const [uniqueName, item] of Object.entries(ExportResources)) {
let name = getString(item.name, lang); let name = getString(item.name, lang);

View File

@ -40,6 +40,7 @@ import {
ExportBoosters, ExportBoosters,
ExportBundles, ExportBundles,
ExportChallenges, ExportChallenges,
ExportCreditBundles,
ExportCustoms, ExportCustoms,
ExportDrones, ExportDrones,
ExportEmailItems, ExportEmailItems,
@ -48,7 +49,6 @@ import {
ExportFusionBundles, ExportFusionBundles,
ExportGear, ExportGear,
ExportKeys, ExportKeys,
ExportMisc,
ExportRailjackWeapons, ExportRailjackWeapons,
ExportRecipes, ExportRecipes,
ExportResources, ExportResources,
@ -631,8 +631,8 @@ export const addItem = async (
}; };
} }
} }
if (typeName in ExportMisc.creditBundles) { if (typeName in ExportCreditBundles) {
const creditsTotal = ExportMisc.creditBundles[typeName] * quantity; const creditsTotal = ExportCreditBundles[typeName].credits * quantity;
inventory.RegularCredits += creditsTotal; inventory.RegularCredits += creditsTotal;
return { return {
RegularCredits: creditsTotal RegularCredits: creditsTotal

View File

@ -323,3 +323,13 @@ export const getDefaultUpgrades = (parts: string[]): IDefaultUpgrade[] | undefin
} }
return allDefaultUpgrades.length == 0 ? undefined : allDefaultUpgrades; return allDefaultUpgrades.length == 0 ? undefined : allDefaultUpgrades;
}; };
export const getMaxLevelCap = (type: string): number => {
if (type in ExportWarframes) {
return ExportWarframes[type].maxLevelCap ?? 30;
}
if (type in ExportWeapons) {
return ExportWeapons[type].maxLevelCap ?? 30;
}
return 30;
};

View File

@ -24,8 +24,8 @@ import {
ExportBoosterPacks, ExportBoosterPacks,
ExportBoosters, ExportBoosters,
ExportBundles, ExportBundles,
ExportCreditBundles,
ExportGear, ExportGear,
ExportMisc,
ExportResources, ExportResources,
ExportSyndicates, ExportSyndicates,
ExportVendors ExportVendors
@ -631,8 +631,8 @@ const handleCreditBundlePurchase = async (
typeName: string, typeName: string,
inventory: TInventoryDatabaseDocument inventory: TInventoryDatabaseDocument
): Promise<IPurchaseResponse> => { ): Promise<IPurchaseResponse> => {
if (typeName && typeName in ExportMisc.creditBundles) { if (typeName && typeName in ExportCreditBundles) {
const creditsAmount = ExportMisc.creditBundles[typeName]; const creditsAmount = ExportCreditBundles[typeName].credits;
inventory.RegularCredits += creditsAmount; inventory.RegularCredits += creditsAmount;
await inventory.save(); await inventory.save();