fix: handle "skip prologue" to visit orbiter in U14 (#1999)
Reviewed-on: OpenWF/SpaceNinjaServer#1999 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
							
								
									5fefd189af
								
							
						
					
					
						commit
						005690daa4
					
				@ -25,6 +25,9 @@ import { logger } from "@/src/utils/logger";
 | 
				
			|||||||
import { catBreadHash } from "@/src/helpers/stringHelpers";
 | 
					import { catBreadHash } from "@/src/helpers/stringHelpers";
 | 
				
			||||||
import { Types } from "mongoose";
 | 
					import { Types } from "mongoose";
 | 
				
			||||||
import { isNemesisCompatibleWithVersion } from "@/src/helpers/nemesisHelpers";
 | 
					import { isNemesisCompatibleWithVersion } from "@/src/helpers/nemesisHelpers";
 | 
				
			||||||
 | 
					import { version_compare } from "@/src/services/worldStateService";
 | 
				
			||||||
 | 
					import { getPersonalRooms } from "@/src/services/personalRoomsService";
 | 
				
			||||||
 | 
					import { IPersonalRoomsClient } from "@/src/types/personalRoomsTypes";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const inventoryController: RequestHandler = async (request, response) => {
 | 
					export const inventoryController: RequestHandler = async (request, response) => {
 | 
				
			||||||
    const account = await getAccountForRequest(request);
 | 
					    const account = await getAccountForRequest(request);
 | 
				
			||||||
@ -312,6 +315,12 @@ export const getInventoryResponse = async (
 | 
				
			|||||||
        inventoryResponse.Nemesis = undefined;
 | 
					        inventoryResponse.Nemesis = undefined;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (buildLabel && version_compare(buildLabel, "2018.02.22.14.34") < 0) {
 | 
				
			||||||
 | 
					        const personalRoomsDb = await getPersonalRooms(inventory.accountOwnerId.toString());
 | 
				
			||||||
 | 
					        const personalRooms = personalRoomsDb.toJSON<IPersonalRoomsClient>();
 | 
				
			||||||
 | 
					        inventoryResponse.Ship = personalRooms.Ship;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return inventoryResponse;
 | 
					    return inventoryResponse;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -225,6 +225,7 @@ apiRouter.post("/changeDojoRoot.php", changeDojoRootController);
 | 
				
			|||||||
apiRouter.post("/claimCompletedRecipe.php", claimCompletedRecipeController);
 | 
					apiRouter.post("/claimCompletedRecipe.php", claimCompletedRecipeController);
 | 
				
			||||||
apiRouter.post("/clearDialogueHistory.php", clearDialogueHistoryController);
 | 
					apiRouter.post("/clearDialogueHistory.php", clearDialogueHistoryController);
 | 
				
			||||||
apiRouter.post("/clearNewEpisodeReward.php", clearNewEpisodeRewardController);
 | 
					apiRouter.post("/clearNewEpisodeReward.php", clearNewEpisodeRewardController);
 | 
				
			||||||
 | 
					apiRouter.post("/commitStoryModeDecision.php", (_req, res) => { res.end(); }); // U14 (maybe wanna actually unlock the ship features?)
 | 
				
			||||||
apiRouter.post("/completeRandomModChallenge.php", completeRandomModChallengeController);
 | 
					apiRouter.post("/completeRandomModChallenge.php", completeRandomModChallengeController);
 | 
				
			||||||
apiRouter.post("/confirmGuildInvitation.php", confirmGuildInvitationPostController);
 | 
					apiRouter.post("/confirmGuildInvitation.php", confirmGuildInvitationPostController);
 | 
				
			||||||
apiRouter.post("/contributeGuildClass.php", contributeGuildClassController);
 | 
					apiRouter.post("/contributeGuildClass.php", contributeGuildClassController);
 | 
				
			||||||
 | 
				
			|||||||
@ -11,6 +11,7 @@ import {
 | 
				
			|||||||
    IOperatorConfigDatabase
 | 
					    IOperatorConfigDatabase
 | 
				
			||||||
} from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
					} from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
				
			||||||
import { IFingerprintStat, RivenFingerprint } from "@/src/helpers/rivenHelper";
 | 
					import { IFingerprintStat, RivenFingerprint } from "@/src/helpers/rivenHelper";
 | 
				
			||||||
 | 
					import { IOrbiter } from "../personalRoomsTypes";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export type InventoryDatabaseEquipment = {
 | 
					export type InventoryDatabaseEquipment = {
 | 
				
			||||||
    [_ in TEquipmentKey]: IEquipmentDatabase[];
 | 
					    [_ in TEquipmentKey]: IEquipmentDatabase[];
 | 
				
			||||||
@ -373,6 +374,7 @@ export interface IInventoryClient extends IDailyAffiliations, InventoryClientEqu
 | 
				
			|||||||
    BrandedSuits?: IOid[];
 | 
					    BrandedSuits?: IOid[];
 | 
				
			||||||
    LockedWeaponGroup?: ILockedWeaponGroupClient;
 | 
					    LockedWeaponGroup?: ILockedWeaponGroupClient;
 | 
				
			||||||
    HubNpcCustomizations?: IHubNpcCustomization[];
 | 
					    HubNpcCustomizations?: IHubNpcCustomization[];
 | 
				
			||||||
 | 
					    Ship?: IOrbiter; // U22 and below, response only
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export interface IAffiliation {
 | 
					export interface IAffiliation {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user