XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

feat: track LastRegionPlayed (#428)

Co-authored-by: Sainan <Sainan@users.noreply.github.com>

4e03b7b9
Sainan <sainan@calamity.gg>
提交于

代码差异

3 个文件 +26 -1
Modified src/services/inventoryService.ts +5 -0
@@ -669,6 +669,11 @@ export const missionInventoryUpdate = async (data: IMissionInventoryUpdateReques
669 669 }
670 670 }
671 671
672 // LastRegionPlayed
673 if (data.LastRegionPlayed) {
674 inventory.LastRegionPlayed = data.LastRegionPlayed;
675 }
676
672 677 // other
673 678 addMods(inventory, RawUpgrades);
674 679 addMiscItems(inventory, MiscItems);
Modified src/types/inventoryTypes/inventoryTypes.ts +19 -1
@@ -86,6 +86,24 @@ export interface IMailbox {
86 86 LastInboxId: IOid;
87 87 }
88 88
89 export type TSolarMapRegion =
90 | "Earth"
91 | "Ceres"
92 | "Eris"
93 | "Europa"
94 | "Jupiter"
95 | "Mars"
96 | "Mercury"
97 | "Neptune"
98 | "Phobos"
99 | "Pluto"
100 | "Saturn"
101 | "Sedna"
102 | "Uranus"
103 | "Venus"
104 | "Void"
105 | "SolarMapDeimosName";
106
89 107 //TODO: perhaps split response and database into their own files
90 108
91 109 export interface IPendingRecipeResponse extends Omit<IPendingRecipe, "CompletionDate"> {
@@ -142,7 +160,7 @@ export interface IInventoryResponse {
142 160 CurrentLoadOutIds: Array<any[] | IOid>;
143 161 Missions: IMission[];
144 162 RandomUpgradesIdentified?: number;
145 LastRegionPlayed: string;
163 LastRegionPlayed: TSolarMapRegion;
146 164 XPInfo: ITypeXPItem[];
147 165 Recipes: ITypeCount[];
148 166 WeaponSkins: IWeaponSkinClient[];
Modified src/types/requestTypes.ts +2 -0
@@ -11,6 +11,7 @@ import {
11 11 IMission,
12 12 IRawUpgrade,
13 13 ISeasonChallenge,
14 TSolarMapRegion,
14 15 TEquipmentKey
15 16 } from "./inventoryTypes/inventoryTypes";
16 17
@@ -57,6 +58,7 @@ export interface IMissionInventoryUpdateRequest {
57 58 RewardInfo?: IMissionInventoryUpdateRequestRewardInfo;
58 59 Missions?: IMission;
59 60 EvolutionProgress?: IEvolutionProgress[];
61 LastRegionPlayed?: TSolarMapRegion;
60 62
61 63 FusionPoints?: number; // Not a part of the request, but we put it in this struct as an intermediate storage.
62 64 }