chore: update PE+ (#2769)
Some more deprecations Reviewed-on: #2769 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
parent
0d388b4b0f
commit
c4f348c252
8
package-lock.json
generated
8
package-lock.json
generated
@ -17,7 +17,7 @@
|
||||
"morgan": "^1.10.0",
|
||||
"ncp": "^2.0.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",
|
||||
"winston": "^3.17.0",
|
||||
"winston-daily-rotate-file": "^5.0.0",
|
||||
@ -5532,9 +5532,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/warframe-public-export-plus": {
|
||||
"version": "0.5.86",
|
||||
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.86.tgz",
|
||||
"integrity": "sha512-tWJudKs4WdjFNiF6ipav9md3sboPXJFvSItTfSmT9ko+Xgg1QP75vS/qPsuPw67pqzMaSnAbHpEzNn/rZ4mCug=="
|
||||
"version": "0.5.87",
|
||||
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.87.tgz",
|
||||
"integrity": "sha512-pWDU3Df3fcEgYn42NNZb2XFOs5AdCIqFF/t9fU7VLpokBWjFzZgLz3O4gILssiUrwB4KCkvnjHi3BivgzJuv6g=="
|
||||
},
|
||||
"node_modules/warframe-riven-info": {
|
||||
"version": "0.1.2",
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
"morgan": "^1.10.0",
|
||||
"ncp": "^2.0.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",
|
||||
"winston": "^3.17.0",
|
||||
"winston-daily-rotate-file": "^5.0.0",
|
||||
|
||||
@ -10,7 +10,7 @@ import type {
|
||||
IMiscItem
|
||||
} 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 { toMongoDate, version_compare } from "../../helpers/inventoryHelpers.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);
|
||||
|
||||
for (const contribution of request.ResourceContributions) {
|
||||
const snack = ExportMisc.helminthSnacks[contribution.ItemType];
|
||||
const snack = ExportResources[contribution.ItemType].helminthSnack!;
|
||||
|
||||
// tally items for removal
|
||||
const change = miscItemChanges.find(x => x.ItemType == contribution.ItemType);
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import { applyClientEquipmentUpdates, getInventory } from "../../services/inventoryService.ts";
|
||||
import { getMaxLevelCap } from "../../services/itemDataService.ts";
|
||||
import { getAccountIdForRequest } from "../../services/loginService.ts";
|
||||
import { broadcastInventoryUpdate } from "../../services/wsService.ts";
|
||||
import type { IOid } from "../../types/commonTypes.ts";
|
||||
import type { IEquipmentClient } from "../../types/equipmentTypes.ts";
|
||||
import type { TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes.ts";
|
||||
import type { RequestHandler } from "express";
|
||||
import { ExportMisc } from "warframe-public-export-plus";
|
||||
|
||||
export const addXpController: RequestHandler = async (req, res) => {
|
||||
const accountId = await getAccountIdForRequest(req);
|
||||
@ -15,7 +15,7 @@ export const addXpController: RequestHandler = async (req, res) => {
|
||||
for (const clientItem of gear) {
|
||||
const dbItem = inventory[category as TEquipmentKey].id((clientItem.ItemId as IOid).$oid);
|
||||
if (dbItem) {
|
||||
if (dbItem.ItemType in ExportMisc.uniqueLevelCaps) {
|
||||
if (getMaxLevelCap(dbItem.ItemType) > 30) {
|
||||
if ((dbItem.Polarized ?? 0) < 5) {
|
||||
dbItem.Polarized = 5;
|
||||
}
|
||||
|
||||
@ -12,7 +12,6 @@ import {
|
||||
ExportFactions,
|
||||
ExportGear,
|
||||
ExportKeys,
|
||||
ExportMisc,
|
||||
ExportRailjackWeapons,
|
||||
ExportRecipes,
|
||||
ExportRelics,
|
||||
@ -80,7 +79,7 @@ const toTitleCase = (str: string): string => {
|
||||
const getItemListsController: RequestHandler = (req, response) => {
|
||||
const lang = getDict(typeof req.query.lang == "string" ? req.query.lang : "en");
|
||||
const res: ItemLists = {
|
||||
uniqueLevelCaps: ExportMisc.uniqueLevelCaps,
|
||||
uniqueLevelCaps: {},
|
||||
Suits: [],
|
||||
LongGuns: [],
|
||||
Melee: [],
|
||||
@ -147,6 +146,9 @@ const getItemListsController: RequestHandler = (req, response) => {
|
||||
name: getString(ability.name || uniqueName, lang)
|
||||
});
|
||||
});
|
||||
if (item.maxLevelCap) {
|
||||
res.uniqueLevelCaps[uniqueName] = item.maxLevelCap;
|
||||
}
|
||||
}
|
||||
for (const [uniqueName, item] of Object.entries(ExportSentinels)) {
|
||||
if (item.productCategory == "Sentinels" || item.productCategory == "KubrowPets") {
|
||||
@ -196,6 +198,9 @@ const getItemListsController: RequestHandler = (req, response) => {
|
||||
name: getString(item.name, lang)
|
||||
});
|
||||
}
|
||||
if (item.maxLevelCap) {
|
||||
res.uniqueLevelCaps[uniqueName] = item.maxLevelCap;
|
||||
}
|
||||
}
|
||||
for (const [uniqueName, item] of Object.entries(ExportResources)) {
|
||||
let name = getString(item.name, lang);
|
||||
|
||||
@ -40,6 +40,7 @@ import {
|
||||
ExportBoosters,
|
||||
ExportBundles,
|
||||
ExportChallenges,
|
||||
ExportCreditBundles,
|
||||
ExportCustoms,
|
||||
ExportDrones,
|
||||
ExportEmailItems,
|
||||
@ -48,7 +49,6 @@ import {
|
||||
ExportFusionBundles,
|
||||
ExportGear,
|
||||
ExportKeys,
|
||||
ExportMisc,
|
||||
ExportRailjackWeapons,
|
||||
ExportRecipes,
|
||||
ExportResources,
|
||||
@ -631,8 +631,8 @@ export const addItem = async (
|
||||
};
|
||||
}
|
||||
}
|
||||
if (typeName in ExportMisc.creditBundles) {
|
||||
const creditsTotal = ExportMisc.creditBundles[typeName] * quantity;
|
||||
if (typeName in ExportCreditBundles) {
|
||||
const creditsTotal = ExportCreditBundles[typeName].credits * quantity;
|
||||
inventory.RegularCredits += creditsTotal;
|
||||
return {
|
||||
RegularCredits: creditsTotal
|
||||
|
||||
@ -323,3 +323,13 @@ export const getDefaultUpgrades = (parts: string[]): IDefaultUpgrade[] | undefin
|
||||
}
|
||||
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;
|
||||
};
|
||||
|
||||
@ -24,8 +24,8 @@ import {
|
||||
ExportBoosterPacks,
|
||||
ExportBoosters,
|
||||
ExportBundles,
|
||||
ExportCreditBundles,
|
||||
ExportGear,
|
||||
ExportMisc,
|
||||
ExportResources,
|
||||
ExportSyndicates,
|
||||
ExportVendors
|
||||
@ -631,8 +631,8 @@ const handleCreditBundlePurchase = async (
|
||||
typeName: string,
|
||||
inventory: TInventoryDatabaseDocument
|
||||
): Promise<IPurchaseResponse> => {
|
||||
if (typeName && typeName in ExportMisc.creditBundles) {
|
||||
const creditsAmount = ExportMisc.creditBundles[typeName];
|
||||
if (typeName && typeName in ExportCreditBundles) {
|
||||
const creditsAmount = ExportCreditBundles[typeName].credits;
|
||||
|
||||
inventory.RegularCredits += creditsAmount;
|
||||
await inventory.save();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user