XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

chore: update PE+ (#1546)

and make use of some of the new data Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1546 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

3f47f89b
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

5 个文件 +21 -65
Modified package-lock.json +4 -4
@@ -18,7 +18,7 @@
18 18 "morgan": "^1.10.0",
19 19 "ncp": "^2.0.0",
20 20 "typescript": ">=5.5 <5.6.0",
21 "warframe-public-export-plus": "^0.5.52",
21 "warframe-public-export-plus": "^0.5.53",
22 22 "warframe-riven-info": "^0.1.2",
23 23 "winston": "^3.17.0",
24 24 "winston-daily-rotate-file": "^5.0.0"
@@ -3789,9 +3789,9 @@
3789 3789 }
3790 3790 },
3791 3791 "node_modules/warframe-public-export-plus": {
3792 "version": "0.5.52",
3793 "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.52.tgz",
3794 "integrity": "sha512-mJyQbTFMDwgBSkhUYJzcfJg9qrMTrL1pyZuAxV/Dov68xUikK5zigQSYM3ZkKYbhwBtg0Bx/+7q9GAmPzGaRhA=="
3792 "version": "0.5.53",
3793 "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.53.tgz",
3794 "integrity": "sha512-FjYeCJ5OxvPWyETnV33YOeX7weVVeMy451RY7uewwSvRbSNFTDhmhvbrLhfwykulUX4RPakfZr8nO0S0a6lGCA=="
3795 3795 },
3796 3796 "node_modules/warframe-riven-info": {
3797 3797 "version": "0.1.2",
Modified package.json +1 -1
@@ -25,7 +25,7 @@
25 25 "morgan": "^1.10.0",
26 26 "ncp": "^2.0.0",
27 27 "typescript": ">=5.5 <5.6.0",
28 "warframe-public-export-plus": "^0.5.52",
28 "warframe-public-export-plus": "^0.5.53",
29 29 "warframe-riven-info": "^0.1.2",
30 30 "winston": "^3.17.0",
31 31 "winston-daily-rotate-file": "^5.0.0"
Modified src/controllers/dynamic/worldStateController.ts +2 -3
@@ -9,11 +9,10 @@ import { IMongoDate, IOid } from "@/src/types/commonTypes";
9 9 import { unixTimesInMs } from "@/src/constants/timeConstants";
10 10 import { config } from "@/src/services/configService";
11 11 import { CRng } from "@/src/services/rngService";
12 import { ExportNightwave, ExportRegions } from "warframe-public-export-plus";
12 import { eMissionType, ExportNightwave, ExportRegions } from "warframe-public-export-plus";
13 13 import {
14 14 EPOCH,
15 15 getSortieTime,
16 missionTags,
17 16 sortieBosses,
18 17 sortieBossNode,
19 18 sortieBossToFaction,
@@ -269,7 +268,7 @@ export const worldStateController: RequestHandler = (req, res) => {
269 268 }
270 269 }
271 270
272 const missionType = missionTags[missionIndex];
271 const missionType = eMissionType[missionIndex].tag;
273 272
274 273 if (missionTypes.has(missionType)) {
275 274 i--;
Modified src/helpers/worldStateHelper.ts +0 -46
@@ -1,49 +1,3 @@
1 export const missionTags = [
2 "MT_ASSASSINATION",
3 "MT_EXTERMINATION",
4 "MT_SURVIVAL",
5 "MT_RESCUE",
6 "MT_SABOTAGE",
7 "MT_CAPTURE",
8 "MT_COUNTER_INTEL",
9 "MT_INTEL",
10 "MT_DEFENSE",
11 "MT_MOBILE_DEFENSE",
12 "MT_PVP",
13 "MT_MASTERY",
14 "MT_RECOVERY",
15 "MT_TERRITORY",
16 "MT_RETRIEVAL",
17 "MT_HIVE",
18 "MT_SALVAGE",
19 "MT_EXCAVATE",
20 "MT_RAID",
21 "MT_PURGE",
22 "MT_GENERIC",
23 "MT_PURIFY",
24 "MT_ARENA",
25 "MT_JUNCTION",
26 "MT_PURSUIT",
27 "MT_RACE",
28 "MT_ASSAULT",
29 "MT_EVACUATION",
30 "MT_LANDSCAPE",
31 "MT_RESOURCE_THEFT",
32 "MT_ENDLESS_EXTERMINATION",
33 "MT_ENDLESS_DUVIRI",
34 "MT_RAILJACK",
35 "MT_ARTIFACT",
36 "MT_CORRUPTION",
37 "MT_VOID_CASCADE",
38 "MT_ARMAGEDDON",
39 "MT_VAULTS",
40 "MT_ALCHEMY",
41 "MT_ASCENSION",
42 "MT_ENDLESS_CAPTURE",
43 "MT_OFFERING",
44 "MT_PVPVE"
45 ];
46
47 1 export const sortieBosses = [
48 2 "SORTIE_BOSS_HYENA",
49 3 "SORTIE_BOSS_KELA",
Modified src/services/missionInventoryUpdateService.ts +14 -11
@@ -619,16 +619,12 @@ export const addMissionRewards = async (
619 619
620 620 if (strippedItems) {
621 621 for (const si of strippedItems) {
622 const droptable = ExportEnemies.droptables[si.DropTable];
623 // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
624 if (!droptable) {
625 logger.error(`unknown droptable ${si.DropTable}`);
626 } else {
627 const modsPool = droptable[0].items;
628 const blueprintsPool = (droptable.length > 1 ? droptable[1] : droptable[0]).items;
629 if (si.DROP_MOD) {
622 const droptables = ExportEnemies.droptables[si.DropTable] ?? [];
623 if (si.DROP_MOD) {
624 const modDroptable = droptables.find(x => x.type == "mod");
625 if (modDroptable) {
630 626 for (let i = 0; i != si.DROP_MOD.length; ++i) {
631 const reward = getRandomReward(modsPool)!;
627 const reward = getRandomReward(modDroptable.items)!;
632 628 logger.debug(`stripped droptable (mods pool) rolled`, reward);
633 629 await addItem(inventory, reward.type);
634 630 MissionRewards.push({
@@ -637,10 +633,15 @@ export const addMissionRewards = async (
637 633 FromEnemyCache: true // to show "identified"
638 634 });
639 635 }
636 } else {
637 logger.error(`unknown droptable ${si.DropTable} for DROP_MOD`);
640 638 }
641 if (si.DROP_BLUEPRINT) {
639 }
640 if (si.DROP_BLUEPRINT) {
641 const blueprintDroptable = droptables.find(x => x.type == "blueprint");
642 if (blueprintDroptable) {
642 643 for (let i = 0; i != si.DROP_BLUEPRINT.length; ++i) {
643 const reward = getRandomReward(blueprintsPool)!;
644 const reward = getRandomReward(blueprintDroptable.items)!;
644 645 logger.debug(`stripped droptable (blueprints pool) rolled`, reward);
645 646 await addItem(inventory, reward.type);
646 647 MissionRewards.push({
@@ -649,6 +650,8 @@ export const addMissionRewards = async (
649 650 FromEnemyCache: true // to show "identified"
650 651 });
651 652 }
653 } else {
654 logger.error(`unknown droptable ${si.DropTable} for DROP_BLUEPRINT`);
652 655 }
653 656 }
654 657 }