XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

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>

a4922d4c
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

2 个文件 +8 -1
Modified src/controllers/api/missionInventoryUpdateController.ts +7 -1
@@ -98,8 +98,14 @@ export const missionInventoryUpdateController: RequestHandler = async (req, res)
98 98 const inventoryResponse = await getInventoryResponse(inventory, true, account.BuildLabel);
99 99
100 100 //TODO: figure out when to send inventory. it is needed for many cases.
101 if (missionReport.RJ) {
102 logger.debug(`railjack interstitial request, sending only deltas`, {
103 InventoryChanges: inventoryChanges,
104 AffiliationMods
105 });
106 }
101 107 res.json({
102 InventoryJson: JSON.stringify(inventoryResponse),
108 InventoryJson: missionReport.RJ ? undefined : JSON.stringify(inventoryResponse),
103 109 InventoryChanges: inventoryChanges,
104 110 MissionRewards,
105 111 ...credits,
Modified src/types/requestTypes.ts +1 -0
@@ -148,6 +148,7 @@ export type IMissionInventoryUpdateRequest = {
148 148 MultiProgress: unknown[];
149 149 }[];
150 150 InvasionProgress?: IInvasionProgressClient[];
151 RJ?: boolean;
151 152 ConquestMissionsCompleted?: number;
152 153 duviriSuitSelection?: string;
153 154 duviriPistolSelection?: string;