From 9800644de8f3e83529dd2cd6c2b8bb65dd7c2b47 Mon Sep 17 00:00:00 2001 From: Sainan Date: Sat, 15 Mar 2025 13:49:11 +0100 Subject: [PATCH] chore: set HasOwnedVoidProjectionsPreviously when acquiring a relic --- src/controllers/api/inventoryController.ts | 3 --- src/models/inventoryModels/inventoryModel.ts | 1 + src/services/inventoryService.ts | 1 + src/types/inventoryTypes/inventoryTypes.ts | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/controllers/api/inventoryController.ts b/src/controllers/api/inventoryController.ts index 40d13d4c..77f7bb1c 100644 --- a/src/controllers/api/inventoryController.ts +++ b/src/controllers/api/inventoryController.ts @@ -255,9 +255,6 @@ export const getInventoryResponse = async ( applyCheatsToInfestedFoundry(inventoryResponse.InfestedFoundry); } - // This determines if the "void fissures" tab is shown in navigation. - inventoryResponse.HasOwnedVoidProjectionsPreviously = true; - // Omitting this field so opening the navigation resyncs the inventory which is more desirable for typical usage. //inventoryResponse.LastInventorySync = toOid(new Types.ObjectId()); diff --git a/src/models/inventoryModels/inventoryModel.ts b/src/models/inventoryModels/inventoryModel.ts index c0bdcb58..b0a84f5f 100644 --- a/src/models/inventoryModels/inventoryModel.ts +++ b/src/models/inventoryModels/inventoryModel.ts @@ -1186,6 +1186,7 @@ const inventorySchema = new Schema( ReceivedStartingGear: Boolean, ArchwingEnabled: Boolean, + HasOwnedVoidProjectionsPreviously: Boolean, //Use Operator\Drifter UseAdultOperatorLoadout: Boolean, diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts index cac1254d..0408115c 100644 --- a/src/services/inventoryService.ts +++ b/src/services/inventoryService.ts @@ -536,6 +536,7 @@ export const addItem = async ( } satisfies IMiscItem ]; addMiscItems(inventory, miscItemChanges); + inventory.HasOwnedVoidProjectionsPreviously = true; return { InventoryChanges: { MiscItems: miscItemChanges diff --git a/src/types/inventoryTypes/inventoryTypes.ts b/src/types/inventoryTypes/inventoryTypes.ts index 70d070b0..2aee2a67 100644 --- a/src/types/inventoryTypes/inventoryTypes.ts +++ b/src/types/inventoryTypes/inventoryTypes.ts @@ -252,7 +252,7 @@ export interface IInventoryClient extends IDailyAffiliations, InventoryClientEqu Affiliations: IAffiliation[]; QualifyingInvasions: any[]; FactionScores: number[]; - ArchwingEnabled: boolean; + ArchwingEnabled?: boolean; PendingSpectreLoadouts?: ISpectreLoadout[]; SpectreLoadouts?: ISpectreLoadout[]; EmailItems: ITypeCount[];