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);
 | 
			
		||||
 | 
			
		||||
    //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({
 | 
			
		||||
        InventoryJson: JSON.stringify(inventoryResponse),
 | 
			
		||||
        InventoryJson: missionReport.RJ ? undefined : JSON.stringify(inventoryResponse),
 | 
			
		||||
        InventoryChanges: inventoryChanges,
 | 
			
		||||
        MissionRewards,
 | 
			
		||||
        ...credits,
 | 
			
		||||
 | 
			
		||||
@ -148,6 +148,7 @@ export type IMissionInventoryUpdateRequest = {
 | 
			
		||||
        MultiProgress: unknown[];
 | 
			
		||||
    }[];
 | 
			
		||||
    InvasionProgress?: IInvasionProgressClient[];
 | 
			
		||||
    RJ?: boolean;
 | 
			
		||||
    ConquestMissionsCompleted?: number;
 | 
			
		||||
    duviriSuitSelection?: string;
 | 
			
		||||
    duviriPistolSelection?: string;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user