forked from OpenWF/SpaceNinjaServer
		
	chore: improve handling of RJ interstitial missionInventoryUpdate (#2600)
InventoryJson should only be returned when going back to dojo, in which case RJ is also not present in the request anymore. Reviewed-on: OpenWF/SpaceNinjaServer#2600 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									679752633a
								
							
						
					
					
						commit
						a4922d4c35
					
				@ -98,8 +98,14 @@ export const missionInventoryUpdateController: RequestHandler = async (req, res)
 | 
				
			|||||||
    const inventoryResponse = await getInventoryResponse(inventory, true, account.BuildLabel);
 | 
					    const inventoryResponse = await getInventoryResponse(inventory, true, account.BuildLabel);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //TODO: figure out when to send inventory. it is needed for many cases.
 | 
					    //TODO: figure out when to send inventory. it is needed for many cases.
 | 
				
			||||||
 | 
					    if (missionReport.RJ) {
 | 
				
			||||||
 | 
					        logger.debug(`railjack interstitial request, sending only deltas`, {
 | 
				
			||||||
 | 
					            InventoryChanges: inventoryChanges,
 | 
				
			||||||
 | 
					            AffiliationMods
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    res.json({
 | 
					    res.json({
 | 
				
			||||||
        InventoryJson: JSON.stringify(inventoryResponse),
 | 
					        InventoryJson: missionReport.RJ ? undefined : JSON.stringify(inventoryResponse),
 | 
				
			||||||
        InventoryChanges: inventoryChanges,
 | 
					        InventoryChanges: inventoryChanges,
 | 
				
			||||||
        MissionRewards,
 | 
					        MissionRewards,
 | 
				
			||||||
        ...credits,
 | 
					        ...credits,
 | 
				
			||||||
 | 
				
			|||||||
@ -148,6 +148,7 @@ export type IMissionInventoryUpdateRequest = {
 | 
				
			|||||||
        MultiProgress: unknown[];
 | 
					        MultiProgress: unknown[];
 | 
				
			||||||
    }[];
 | 
					    }[];
 | 
				
			||||||
    InvasionProgress?: IInvasionProgressClient[];
 | 
					    InvasionProgress?: IInvasionProgressClient[];
 | 
				
			||||||
 | 
					    RJ?: boolean;
 | 
				
			||||||
    ConquestMissionsCompleted?: number;
 | 
					    ConquestMissionsCompleted?: number;
 | 
				
			||||||
    duviriSuitSelection?: string;
 | 
					    duviriSuitSelection?: string;
 | 
				
			||||||
    duviriPistolSelection?: string;
 | 
					    duviriPistolSelection?: string;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user