forked from OpenWF/SpaceNinjaServer
		
	chore: improve archwing mission detection
SettlementNode10 was not being excluded
This commit is contained in:
		
							parent
							
								
									daacbf6f7b
								
							
						
					
					
						commit
						40aa39f1d1
					
				@ -6,6 +6,7 @@ import { logger } from "../utils/logger";
 | 
			
		||||
import { IOid } from "../types/commonTypes";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
import { addMods } from "../services/inventoryService";
 | 
			
		||||
import { isArchwingMission } from "../services/worldStateService";
 | 
			
		||||
 | 
			
		||||
export const getInfNodes = (faction: string, rank: number): IInfNode[] => {
 | 
			
		||||
    const infNodes = [];
 | 
			
		||||
@ -22,7 +23,7 @@ export const getInfNodes = (faction: string, rank: number): IInfNode[] => {
 | 
			
		||||
            value.missionIndex != 42 && // not face off
 | 
			
		||||
            value.name.indexOf("1999NodeI") == -1 && // not stage defence
 | 
			
		||||
            value.name.indexOf("1999NodeJ") == -1 && // not lich bounty
 | 
			
		||||
            value.name.indexOf("Archwing") == -1
 | 
			
		||||
            !isArchwingMission(value)
 | 
			
		||||
        ) {
 | 
			
		||||
            //console.log(dict_en[value.name]);
 | 
			
		||||
            infNodes.push({ Node: key, Influence: 1 });
 | 
			
		||||
 | 
			
		||||
@ -177,7 +177,7 @@ const pushSyndicateMissions = (
 | 
			
		||||
    const nodeOptions: string[] = [];
 | 
			
		||||
    for (const [key, value] of Object.entries(ExportRegions)) {
 | 
			
		||||
        if (
 | 
			
		||||
            value.name.indexOf("Archwing") == -1 && // no archwing
 | 
			
		||||
            !isArchwingMission(value) &&
 | 
			
		||||
            value.systemIndex != 23 && // no 1999 stuff
 | 
			
		||||
            value.missionIndex != 10 && // Exclude MT_PVP (for relays)
 | 
			
		||||
            value.missionIndex != 23 && // no junctions
 | 
			
		||||
@ -261,7 +261,7 @@ const pushSortieIfRelevant = (worldState: IWorldState, day: number): void => {
 | 
			
		||||
        if (
 | 
			
		||||
            sortieFactionToSystemIndexes[sortieBossToFaction[boss]].includes(value.systemIndex) &&
 | 
			
		||||
            sortieFactionToFactionIndexes[sortieBossToFaction[boss]].includes(value.factionIndex!) &&
 | 
			
		||||
            value.name.indexOf("Archwing") == -1 &&
 | 
			
		||||
            !isArchwingMission(value) &&
 | 
			
		||||
            value.missionIndex != 0 && // Exclude MT_ASSASSINATION
 | 
			
		||||
            value.missionIndex != 5 && // Exclude MT_CAPTURE
 | 
			
		||||
            value.missionIndex != 10 && // Exclude MT_PVP (for relays)
 | 
			
		||||
@ -1089,7 +1089,7 @@ export const getLiteSortie = (week: number): ILiteSortie => {
 | 
			
		||||
            value.systemIndex === systemIndex &&
 | 
			
		||||
            value.factionIndex !== undefined &&
 | 
			
		||||
            value.factionIndex < 2 &&
 | 
			
		||||
            value.name.indexOf("Archwing") == -1 &&
 | 
			
		||||
            !isArchwingMission(value) &&
 | 
			
		||||
            value.missionIndex != 0 // Exclude MT_ASSASSINATION
 | 
			
		||||
        ) {
 | 
			
		||||
            nodes.push(key);
 | 
			
		||||
@ -1140,3 +1140,14 @@ export const getLiteSortie = (week: number): ILiteSortie => {
 | 
			
		||||
        ]
 | 
			
		||||
    };
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const isArchwingMission = (node: IRegion): boolean => {
 | 
			
		||||
    if (node.name.indexOf("Archwing") != -1) {
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
    // SettlementNode10
 | 
			
		||||
    if (node.missionIndex == 25) {
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
    return false;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user