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: provide CompletedSortie in missionInventoryUpdate response (#3408)

The client needs this for sortie completion challenges to work. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3408 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

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

代码差异

2 个文件 +7 -2
Modified src/controllers/api/missionInventoryUpdateController.ts +6 -2
@@ -139,10 +139,14 @@ export const missionInventoryUpdateController: RequestHandler = async (req, res)
139 139 "xpBasedLevelCapDisabled" in req.query,
140 140 account.BuildLabel
141 141 );
142 res.json({
142 const response: IMissionInventoryUpdateResponse = {
143 143 InventoryJson: JSON.stringify(inventoryResponse),
144 144 ...deltas
145 } satisfies IMissionInventoryUpdateResponse);
145 };
146 if (missionReport.RewardInfo.sortieTag == "Final" && firstCompletion) {
147 response.CompletedSortie = true;
148 }
149 res.json(response);
146 150 } else {
147 151 logger.debug(`no reward info, assuming this wasn't a mission completion and we should just sync inventory`);
148 152 const inventoryResponse = await getInventoryResponse(
Modified src/types/missionTypes.ts +1 -0
@@ -48,6 +48,7 @@ export interface IMissionInventoryUpdateResponseRailjackInterstitial extends Par
48 48
49 49 export interface IMissionInventoryUpdateResponse extends IMissionInventoryUpdateResponseRailjackInterstitial {
50 50 InventoryJson?: string;
51 CompletedSortie?: true;
51 52 }
52 53
53 54 export interface IMissionInventoryUpdateResponseBackToDryDock {