diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index d0e82376..6f0c667b 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -180,6 +180,22 @@ export const addMissionInventoryUpdates = ( inventory.LoreFragmentScans.push(x); }); break; + case "LibraryScans": + value.forEach(scan => { + if (inventory.LibraryActiveDailyTaskInfo) { + if (inventory.LibraryActiveDailyTaskInfo.EnemyTypes.find(x => x == scan.EnemyType)) { + inventory.LibraryActiveDailyTaskInfo.Scans ??= 0; + inventory.LibraryActiveDailyTaskInfo.Scans += scan.Count; + } else { + logger.warn( + `ignoring synthesis of ${scan.EnemyType} as it's not part of the active daily task` + ); + } + } else { + logger.warn(`no library daily task active, ignoring synthesis of ${scan.EnemyType}`); + } + }); + break; case "SyndicateId": { inventory.CompletedSyndicates.push(value); break; diff --git a/src/types/requestTypes.ts b/src/types/requestTypes.ts index 0220240a..7905dc23 100644 --- a/src/types/requestTypes.ts +++ b/src/types/requestTypes.ts @@ -92,6 +92,12 @@ export type IMissionInventoryUpdateRequest = { IsFinalWave: boolean; Participants: IVoidTearParticipantInfo[]; }; + LibraryScans?: { + EnemyType: string; + Count: number; + CodexScanCount: number; + Standing: number; + }[]; } & { [K in TEquipmentKey]?: IEquipmentClient[]; };