返回提交历史
Modified
package-lock.json
+4
-4
Modified
package.json
+1
-1
Modified
src/controllers/api/infestedFoundryController.ts
+2
-2
Modified
src/controllers/custom/addXpController.ts
+2
-2
Modified
src/controllers/custom/getItemListsController.ts
+7
-2
Modified
src/services/inventoryService.ts
+3
-3
Modified
src/services/itemDataService.ts
+10
-0
Modified
src/services/purchaseService.ts
+3
-3
XFEstudio/XFESpaceNinjaServer
chore: update PE+ (#2769)
Some more deprecations Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2769 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
c4f348c2
代码差异
8 个文件
+32
-17
@@ -17,7 +17,7 @@
17
17
"morgan": "^1.10.0",
18
18
"ncp": "^2.0.0",
19
19
"undici": "^7.10.0",
20
"warframe-public-export-plus": "^0.5.86",
20
"warframe-public-export-plus": "^0.5.87",
21
21
"warframe-riven-info": "^0.1.2",
22
22
"winston": "^3.17.0",
23
23
"winston-daily-rotate-file": "^5.0.0",
@@ -5532,9 +5532,9 @@
5532
5532
}
5533
5533
},
5534
5534
"node_modules/warframe-public-export-plus": {
5535
"version": "0.5.86",
5536
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.86.tgz",
5537
"integrity": "sha512-tWJudKs4WdjFNiF6ipav9md3sboPXJFvSItTfSmT9ko+Xgg1QP75vS/qPsuPw67pqzMaSnAbHpEzNn/rZ4mCug=="
5535
"version": "0.5.87",
5536
"resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.87.tgz",
5537
"integrity": "sha512-pWDU3Df3fcEgYn42NNZb2XFOs5AdCIqFF/t9fU7VLpokBWjFzZgLz3O4gILssiUrwB4KCkvnjHi3BivgzJuv6g=="
5538
5538
},
5539
5539
"node_modules/warframe-riven-info": {
5540
5540
"version": "0.1.2",
@@ -35,7 +35,7 @@
35
35
"morgan": "^1.10.0",
36
36
"ncp": "^2.0.0",
37
37
"undici": "^7.10.0",
38
"warframe-public-export-plus": "^0.5.86",
38
"warframe-public-export-plus": "^0.5.87",
39
39
"warframe-riven-info": "^0.1.2",
40
40
"winston": "^3.17.0",
41
41
"winston-daily-rotate-file": "^5.0.0",
@@ -10,7 +10,7 @@ import type {
10
10
IMiscItem
11
11
} from "../../types/inventoryTypes/inventoryTypes.ts";
12
12
import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts";
13
import { ExportMisc } from "warframe-public-export-plus";
13
import { ExportResources } from "warframe-public-export-plus";
14
14
import { getRecipe } from "../../services/itemDataService.ts";
15
15
import { toMongoDate, version_compare } from "../../helpers/inventoryHelpers.ts";
16
16
import { logger } from "../../utils/logger.ts";
@@ -146,7 +146,7 @@ export const infestedFoundryController: RequestHandler = async (req, res) => {
146
146
const currentUnixSeconds = Math.trunc(Date.now() / 1000);
147
147
148
148
for (const contribution of request.ResourceContributions) {
149
const snack = ExportMisc.helminthSnacks[contribution.ItemType];
149
const snack = ExportResources[contribution.ItemType].helminthSnack!;
150
150
151
151
// tally items for removal
152
152
const change = miscItemChanges.find(x => x.ItemType == contribution.ItemType);
@@ -1,11 +1,11 @@
1
1
import { applyClientEquipmentUpdates, getInventory } from "../../services/inventoryService.ts";
2
import { getMaxLevelCap } from "../../services/itemDataService.ts";
2
3
import { getAccountIdForRequest } from "../../services/loginService.ts";
3
4
import { broadcastInventoryUpdate } from "../../services/wsService.ts";
4
5
import type { IOid } from "../../types/commonTypes.ts";
5
6
import type { IEquipmentClient } from "../../types/equipmentTypes.ts";
6
7
import type { TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes.ts";
7
8
import type { RequestHandler } from "express";
8
import { ExportMisc } from "warframe-public-export-plus";
9
9
10
10
export const addXpController: RequestHandler = async (req, res) => {
11
11
const accountId = await getAccountIdForRequest(req);
@@ -15,7 +15,7 @@ export const addXpController: RequestHandler = async (req, res) => {
15
15
for (const clientItem of gear) {
16
16
const dbItem = inventory[category as TEquipmentKey].id((clientItem.ItemId as IOid).$oid);
17
17
if (dbItem) {
18
if (dbItem.ItemType in ExportMisc.uniqueLevelCaps) {
18
if (getMaxLevelCap(dbItem.ItemType) > 30) {
19
19
if ((dbItem.Polarized ?? 0) < 5) {
20
20
dbItem.Polarized = 5;
21
21
}
@@ -12,7 +12,6 @@ import {
12
12
ExportFactions,
13
13
ExportGear,
14
14
ExportKeys,
15
ExportMisc,
16
15
ExportRailjackWeapons,
17
16
ExportRecipes,
18
17
ExportRelics,
@@ -80,7 +79,7 @@ const toTitleCase = (str: string): string => {
80
79
const getItemListsController: RequestHandler = (req, response) => {
81
80
const lang = getDict(typeof req.query.lang == "string" ? req.query.lang : "en");
82
81
const res: ItemLists = {
83
uniqueLevelCaps: ExportMisc.uniqueLevelCaps,
82
uniqueLevelCaps: {},
84
83
Suits: [],
85
84
LongGuns: [],
86
85
Melee: [],
@@ -147,6 +146,9 @@ const getItemListsController: RequestHandler = (req, response) => {
147
146
name: getString(ability.name || uniqueName, lang)
148
147
});
149
148
});
149
if (item.maxLevelCap) {
150
res.uniqueLevelCaps[uniqueName] = item.maxLevelCap;
151
}
150
152
}
151
153
for (const [uniqueName, item] of Object.entries(ExportSentinels)) {
152
154
if (item.productCategory == "Sentinels" || item.productCategory == "KubrowPets") {
@@ -196,6 +198,9 @@ const getItemListsController: RequestHandler = (req, response) => {
196
198
name: getString(item.name, lang)
197
199
});
198
200
}
201
if (item.maxLevelCap) {
202
res.uniqueLevelCaps[uniqueName] = item.maxLevelCap;
203
}
199
204
}
200
205
for (const [uniqueName, item] of Object.entries(ExportResources)) {
201
206
let name = getString(item.name, lang);
@@ -40,6 +40,7 @@ import {
40
40
ExportBoosters,
41
41
ExportBundles,
42
42
ExportChallenges,
43
ExportCreditBundles,
43
44
ExportCustoms,
44
45
ExportDrones,
45
46
ExportEmailItems,
@@ -48,7 +49,6 @@ import {
48
49
ExportFusionBundles,
49
50
ExportGear,
50
51
ExportKeys,
51
ExportMisc,
52
52
ExportRailjackWeapons,
53
53
ExportRecipes,
54
54
ExportResources,
@@ -631,8 +631,8 @@ export const addItem = async (
631
631
};
632
632
}
633
633
}
634
if (typeName in ExportMisc.creditBundles) {
635
const creditsTotal = ExportMisc.creditBundles[typeName] * quantity;
634
if (typeName in ExportCreditBundles) {
635
const creditsTotal = ExportCreditBundles[typeName].credits * quantity;
636
636
inventory.RegularCredits += creditsTotal;
637
637
return {
638
638
RegularCredits: creditsTotal
@@ -323,3 +323,13 @@ export const getDefaultUpgrades = (parts: string[]): IDefaultUpgrade[] | undefin
323
323
}
324
324
return allDefaultUpgrades.length == 0 ? undefined : allDefaultUpgrades;
325
325
};
326
327
export const getMaxLevelCap = (type: string): number => {
328
if (type in ExportWarframes) {
329
return ExportWarframes[type].maxLevelCap ?? 30;
330
}
331
if (type in ExportWeapons) {
332
return ExportWeapons[type].maxLevelCap ?? 30;
333
}
334
return 30;
335
};
@@ -24,8 +24,8 @@ import {
24
24
ExportBoosterPacks,
25
25
ExportBoosters,
26
26
ExportBundles,
27
ExportCreditBundles,
27
28
ExportGear,
28
ExportMisc,
29
29
ExportResources,
30
30
ExportSyndicates,
31
31
ExportVendors
@@ -631,8 +631,8 @@ const handleCreditBundlePurchase = async (
631
631
typeName: string,
632
632
inventory: TInventoryDatabaseDocument
633
633
): Promise<IPurchaseResponse> => {
634
if (typeName && typeName in ExportMisc.creditBundles) {
635
const creditsAmount = ExportMisc.creditBundles[typeName];
634
if (typeName && typeName in ExportCreditBundles) {
635
const creditsAmount = ExportCreditBundles[typeName].credits;
636
636
637
637
inventory.RegularCredits += creditsAmount;
638
638
await inventory.save();