more cleanup
This commit is contained in:
		
							parent
							
								
									500b875f58
								
							
						
					
					
						commit
						9eff55538d
					
				@ -57,6 +57,7 @@ export const missionInventoryUpdateController: RequestHandler = async (req, res)
 | 
			
		||||
    if (missionReport.MissionStatus !== "GS_SUCCESS") {
 | 
			
		||||
        console.log(`Mission failed: ${missionReport.RewardInfo?.node}`);
 | 
			
		||||
        //todo: return expected response for failed mission
 | 
			
		||||
        res.json([]);
 | 
			
		||||
        //duvirisadjob does not provide missionStatus
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -300,10 +300,12 @@ function getRandomMissionDrops(RewardInfo: IRewardInfo): IRngResult[] {
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
        if (region.cacheRewardManifest && RewardInfo.EnemyCachesFound) {
 | 
			
		||||
            console.log("cache rewards", RewardInfo.EnemyCachesFound);
 | 
			
		||||
            const deck = ExportRewards[region.cacheRewardManifest];
 | 
			
		||||
            for (let rotation = 0; rotation != RewardInfo.EnemyCachesFound; ++rotation) {
 | 
			
		||||
                const drop = getRandomRewardByChance(deck[rotation]);
 | 
			
		||||
                if (drop) {
 | 
			
		||||
                    console.log("cache drop", drop);
 | 
			
		||||
                    drops.push(drop);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
@ -13,9 +13,9 @@ export const getPersonalRooms = async (accountId: string) => {
 | 
			
		||||
export const updateShipFeature = async (accountId: string, shipFeature: string) => {
 | 
			
		||||
    const personalRooms = await getPersonalRooms(accountId);
 | 
			
		||||
 | 
			
		||||
    // if (personalRooms.Ship.Features.includes(shipFeature)) {
 | 
			
		||||
    //     throw new Error(`ship feature ${shipFeature} already unlocked`);
 | 
			
		||||
    // }
 | 
			
		||||
    if (personalRooms.Ship.Features.includes(shipFeature)) {
 | 
			
		||||
        throw new Error(`ship feature ${shipFeature} already unlocked`);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    personalRooms.Ship.Features.push(shipFeature);
 | 
			
		||||
    await personalRooms.save();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user