diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts index d5a4edb9..5fe79dda 100644 --- a/src/services/inventoryService.ts +++ b/src/services/inventoryService.ts @@ -669,6 +669,11 @@ export const missionInventoryUpdate = async (data: IMissionInventoryUpdateReques } } + // LastRegionPlayed + if (data.LastRegionPlayed) { + inventory.LastRegionPlayed = data.LastRegionPlayed; + } + // other addMods(inventory, RawUpgrades); addMiscItems(inventory, MiscItems); diff --git a/src/types/inventoryTypes/inventoryTypes.ts b/src/types/inventoryTypes/inventoryTypes.ts index f0ad1ec9..7242ad2e 100644 --- a/src/types/inventoryTypes/inventoryTypes.ts +++ b/src/types/inventoryTypes/inventoryTypes.ts @@ -86,6 +86,24 @@ export interface IMailbox { LastInboxId: IOid; } +export type TSolarMapRegion = + | "Earth" + | "Ceres" + | "Eris" + | "Europa" + | "Jupiter" + | "Mars" + | "Mercury" + | "Neptune" + | "Phobos" + | "Pluto" + | "Saturn" + | "Sedna" + | "Uranus" + | "Venus" + | "Void" + | "SolarMapDeimosName"; + //TODO: perhaps split response and database into their own files export interface IPendingRecipeResponse extends Omit { @@ -142,7 +160,7 @@ export interface IInventoryResponse { CurrentLoadOutIds: Array; Missions: IMission[]; RandomUpgradesIdentified?: number; - LastRegionPlayed: string; + LastRegionPlayed: TSolarMapRegion; XPInfo: ITypeXPItem[]; Recipes: ITypeCount[]; WeaponSkins: IWeaponSkinClient[]; diff --git a/src/types/requestTypes.ts b/src/types/requestTypes.ts index 3fc4c0f6..361f347f 100644 --- a/src/types/requestTypes.ts +++ b/src/types/requestTypes.ts @@ -11,6 +11,7 @@ import { IMission, IRawUpgrade, ISeasonChallenge, + TSolarMapRegion, TEquipmentKey } from "./inventoryTypes/inventoryTypes"; @@ -57,6 +58,7 @@ export interface IMissionInventoryUpdateRequest { RewardInfo?: IMissionInventoryUpdateRequestRewardInfo; Missions?: IMission; EvolutionProgress?: IEvolutionProgress[]; + LastRegionPlayed?: TSolarMapRegion; FusionPoints?: number; // Not a part of the request, but we put it in this struct as an intermediate storage. }