feat: track LastRegionPlayed (#428)

Co-authored-by: Sainan <Sainan@users.noreply.github.com>
This commit is contained in:
Sainan 2024-06-29 13:50:32 +02:00 committed by GitHub
parent 97ddfecfb5
commit 4e03b7b92e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 26 additions and 1 deletions

View File

@ -669,6 +669,11 @@ export const missionInventoryUpdate = async (data: IMissionInventoryUpdateReques
} }
} }
// LastRegionPlayed
if (data.LastRegionPlayed) {
inventory.LastRegionPlayed = data.LastRegionPlayed;
}
// other // other
addMods(inventory, RawUpgrades); addMods(inventory, RawUpgrades);
addMiscItems(inventory, MiscItems); addMiscItems(inventory, MiscItems);

View File

@ -86,6 +86,24 @@ export interface IMailbox {
LastInboxId: IOid; 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 //TODO: perhaps split response and database into their own files
export interface IPendingRecipeResponse extends Omit<IPendingRecipe, "CompletionDate"> { export interface IPendingRecipeResponse extends Omit<IPendingRecipe, "CompletionDate"> {
@ -142,7 +160,7 @@ export interface IInventoryResponse {
CurrentLoadOutIds: Array<any[] | IOid>; CurrentLoadOutIds: Array<any[] | IOid>;
Missions: IMission[]; Missions: IMission[];
RandomUpgradesIdentified?: number; RandomUpgradesIdentified?: number;
LastRegionPlayed: string; LastRegionPlayed: TSolarMapRegion;
XPInfo: ITypeXPItem[]; XPInfo: ITypeXPItem[];
Recipes: ITypeCount[]; Recipes: ITypeCount[];
WeaponSkins: IWeaponSkinClient[]; WeaponSkins: IWeaponSkinClient[];

View File

@ -11,6 +11,7 @@ import {
IMission, IMission,
IRawUpgrade, IRawUpgrade,
ISeasonChallenge, ISeasonChallenge,
TSolarMapRegion,
TEquipmentKey TEquipmentKey
} from "./inventoryTypes/inventoryTypes"; } from "./inventoryTypes/inventoryTypes";
@ -57,6 +58,7 @@ export interface IMissionInventoryUpdateRequest {
RewardInfo?: IMissionInventoryUpdateRequestRewardInfo; RewardInfo?: IMissionInventoryUpdateRequestRewardInfo;
Missions?: IMission; Missions?: IMission;
EvolutionProgress?: IEvolutionProgress[]; EvolutionProgress?: IEvolutionProgress[];
LastRegionPlayed?: TSolarMapRegion;
FusionPoints?: number; // Not a part of the request, but we put it in this struct as an intermediate storage. FusionPoints?: number; // Not a part of the request, but we put it in this struct as an intermediate storage.
} }