From a4922d4c35688da9a63e31ed5fae3bf65e660ce4 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Sat, 9 Aug 2025 03:38:10 -0700 Subject: [PATCH] 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: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2600 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- src/controllers/api/missionInventoryUpdateController.ts | 8 +++++++- src/types/requestTypes.ts | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/controllers/api/missionInventoryUpdateController.ts b/src/controllers/api/missionInventoryUpdateController.ts index 49eb6e1be..153ebcee4 100644 --- a/src/controllers/api/missionInventoryUpdateController.ts +++ b/src/controllers/api/missionInventoryUpdateController.ts @@ -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, diff --git a/src/types/requestTypes.ts b/src/types/requestTypes.ts index c9292fc4d..51445b1e6 100644 --- a/src/types/requestTypes.ts +++ b/src/types/requestTypes.ts @@ -148,6 +148,7 @@ export type IMissionInventoryUpdateRequest = { MultiProgress: unknown[]; }[]; InvasionProgress?: IInvasionProgressClient[]; + RJ?: boolean; ConquestMissionsCompleted?: number; duviriSuitSelection?: string; duviriPistolSelection?: string;