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

fix: handle "skip prologue" to visit orbiter in U14 (#1999)

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1999 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

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

代码差异

3 个文件 +12 -0
Modified src/controllers/api/inventoryController.ts +9 -0
@@ -25,6 +25,9 @@ import { logger } from "@/src/utils/logger";
25 25 import { catBreadHash } from "@/src/helpers/stringHelpers";
26 26 import { Types } from "mongoose";
27 27 import { isNemesisCompatibleWithVersion } from "@/src/helpers/nemesisHelpers";
28 import { version_compare } from "@/src/services/worldStateService";
29 import { getPersonalRooms } from "@/src/services/personalRoomsService";
30 import { IPersonalRoomsClient } from "@/src/types/personalRoomsTypes";
28 31
29 32 export const inventoryController: RequestHandler = async (request, response) => {
30 33 const account = await getAccountForRequest(request);
@@ -312,6 +315,12 @@ export const getInventoryResponse = async (
312 315 inventoryResponse.Nemesis = undefined;
313 316 }
314 317
318 if (buildLabel && version_compare(buildLabel, "2018.02.22.14.34") < 0) {
319 const personalRoomsDb = await getPersonalRooms(inventory.accountOwnerId.toString());
320 const personalRooms = personalRoomsDb.toJSON<IPersonalRoomsClient>();
321 inventoryResponse.Ship = personalRooms.Ship;
322 }
323
315 324 return inventoryResponse;
316 325 };
317 326
Modified src/routes/api.ts +1 -0
@@ -225,6 +225,7 @@ apiRouter.post("/changeDojoRoot.php", changeDojoRootController);
225 225 apiRouter.post("/claimCompletedRecipe.php", claimCompletedRecipeController);
226 226 apiRouter.post("/clearDialogueHistory.php", clearDialogueHistoryController);
227 227 apiRouter.post("/clearNewEpisodeReward.php", clearNewEpisodeRewardController);
228 apiRouter.post("/commitStoryModeDecision.php", (_req, res) => { res.end(); }); // U14 (maybe wanna actually unlock the ship features?)
228 229 apiRouter.post("/completeRandomModChallenge.php", completeRandomModChallengeController);
229 230 apiRouter.post("/confirmGuildInvitation.php", confirmGuildInvitationPostController);
230 231 apiRouter.post("/contributeGuildClass.php", contributeGuildClassController);
Modified src/types/inventoryTypes/inventoryTypes.ts +2 -0
@@ -11,6 +11,7 @@ import {
11 11 IOperatorConfigDatabase
12 12 } from "@/src/types/inventoryTypes/commonInventoryTypes";
13 13 import { IFingerprintStat, RivenFingerprint } from "@/src/helpers/rivenHelper";
14 import { IOrbiter } from "../personalRoomsTypes";
14 15
15 16 export type InventoryDatabaseEquipment = {
16 17 [_ in TEquipmentKey]: IEquipmentDatabase[];
@@ -373,6 +374,7 @@ export interface IInventoryClient extends IDailyAffiliations, InventoryClientEqu
373 374 BrandedSuits?: IOid[];
374 375 LockedWeaponGroup?: ILockedWeaponGroupClient;
375 376 HubNpcCustomizations?: IHubNpcCustomization[];
377 Ship?: IOrbiter; // U22 and below, response only
376 378 }
377 379
378 380 export interface IAffiliation {