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: improve archwing mission detection (#1794)

SettlementNode10 was not being excluded Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1794 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

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

代码差异

2 个文件 +17 -5
Modified src/helpers/nemesisHelpers.ts +2 -1
@@ -6,6 +6,7 @@ import { logger } from "../utils/logger";
6 6 import { IOid } from "../types/commonTypes";
7 7 import { Types } from "mongoose";
8 8 import { addMods } from "../services/inventoryService";
9 import { isArchwingMission } from "../services/worldStateService";
9 10
10 11 export const getInfNodes = (faction: string, rank: number): IInfNode[] => {
11 12 const infNodes = [];
@@ -22,7 +23,7 @@ export const getInfNodes = (faction: string, rank: number): IInfNode[] => {
22 23 value.missionIndex != 42 && // not face off
23 24 value.name.indexOf("1999NodeI") == -1 && // not stage defence
24 25 value.name.indexOf("1999NodeJ") == -1 && // not lich bounty
25 value.name.indexOf("Archwing") == -1
26 !isArchwingMission(value)
26 27 ) {
27 28 //console.log(dict_en[value.name]);
28 29 infNodes.push({ Node: key, Influence: 1 });
Modified src/services/worldStateService.ts +15 -4
@@ -4,7 +4,7 @@ import { buildConfig } from "@/src/services/buildConfigService";
4 4 import { unixTimesInMs } from "@/src/constants/timeConstants";
5 5 import { config } from "@/src/services/configService";
6 6 import { CRng } from "@/src/services/rngService";
7 import { eMissionType, ExportNightwave, ExportRegions } from "warframe-public-export-plus";
7 import { eMissionType, ExportNightwave, ExportRegions, IRegion } from "warframe-public-export-plus";
8 8 import {
9 9 ICalendarDay,
10 10 ICalendarSeason,
@@ -185,7 +185,7 @@ const pushSyndicateMissions = (
185 185 const nodeOptions: string[] = [];
186 186 for (const [key, value] of Object.entries(ExportRegions)) {
187 187 if (
188 value.name.indexOf("Archwing") == -1 && // no archwing
188 !isArchwingMission(value) &&
189 189 value.systemIndex != 23 && // no 1999 stuff
190 190 value.missionIndex != 10 && // Exclude MT_PVP (for relays)
191 191 value.missionIndex != 23 && // no junctions
@@ -269,7 +269,7 @@ const pushSortieIfRelevant = (worldState: IWorldState, day: number): void => {
269 269 if (
270 270 sortieFactionToSystemIndexes[sortieBossToFaction[boss]].includes(value.systemIndex) &&
271 271 sortieFactionToFactionIndexes[sortieBossToFaction[boss]].includes(value.factionIndex!) &&
272 value.name.indexOf("Archwing") == -1 &&
272 !isArchwingMission(value) &&
273 273 value.missionIndex != 0 && // Exclude MT_ASSASSINATION
274 274 value.missionIndex != 10 && // Exclude MT_PVP (for relays)
275 275 value.missionIndex != 21 && // Exclude MT_PURIFY
@@ -1112,7 +1112,7 @@ export const getLiteSortie = (week: number): ILiteSortie => {
1112 1112 value.systemIndex === systemIndex &&
1113 1113 value.factionIndex !== undefined &&
1114 1114 value.factionIndex < 2 &&
1115 value.name.indexOf("Archwing") == -1 &&
1115 !isArchwingMission(value) &&
1116 1116 value.missionIndex != 0 // Exclude MT_ASSASSINATION
1117 1117 ) {
1118 1118 nodes.push(key);
@@ -1163,3 +1163,14 @@ export const getLiteSortie = (week: number): ILiteSortie => {
1163 1163 ]
1164 1164 };
1165 1165 };
1166
1167 export const isArchwingMission = (node: IRegion): boolean => {
1168 if (node.name.indexOf("Archwing") != -1) {
1169 return true;
1170 }
1171 // SettlementNode10
1172 if (node.missionIndex == 25) {
1173 return true;
1174 }
1175 return false;
1176 };