返回提交历史
Modified
src/models/inventoryModels/inventoryModel.ts
+36
-1
Modified
src/services/missionInventoryUpdateService.ts
+14
-0
Modified
src/types/inventoryTypes/inventoryTypes.ts
+21
-0
Modified
src/types/requestTypes.ts
+2
-0
XFEstudio/XFESpaceNinjaServer
feat: loc-pin saving (#879)
Closes #404 Co-authored-by: Sainan <sainan@calamity.inc> Reviewed-on: http://209.141.38.3/OpenWF/SpaceNinjaServer/pulls/879 Reviewed-by: Sainan <sainan@noreply.localhost> Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
5460ccf9
代码差异
4 个文件
+73
-1
@@ -60,7 +60,10 @@ import {
60
60
ITraits,
61
61
IKubrowPetDetailsClient,
62
62
IKubrowPetEggDatabase,
63
IKubrowPetEggClient
63
IKubrowPetEggClient,
64
ICustomMarkers,
65
IMarkerInfo,
66
IMarker
64
67
} from "../../types/inventoryTypes/inventoryTypes";
65
68
import { IOid } from "../../types/commonTypes";
66
69
import {
@@ -849,6 +852,35 @@ infestedFoundrySchema.set("toJSON", {
849
852
}
850
853
});
851
854
855
const markerSchema = new Schema<IMarker>(
856
{
857
anchorName: String,
858
color: Number,
859
label: String,
860
x: Number,
861
y: Number,
862
z: Number,
863
showInHud: Boolean
864
},
865
{ _id: false }
866
);
867
868
const markerInfoSchema = new Schema<IMarkerInfo>(
869
{
870
icon: String,
871
markers: [markerSchema]
872
},
873
{ _id: false }
874
);
875
876
const CustomMarkersSchema = new Schema<ICustomMarkers>(
877
{
878
tag: String,
879
markerInfos: [markerInfoSchema]
880
},
881
{ _id: false }
882
);
883
852
884
const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
853
885
{
854
886
accountOwnerId: Schema.Types.ObjectId,
@@ -1133,6 +1165,9 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
1133
1165
//https://warframe.fandom.com/wiki/Incarnon
1134
1166
EvolutionProgress: { type: [evolutionProgressSchema], default: undefined },
1135
1167
1168
//https://warframe.fandom.com/wiki/Loc-Pin
1169
CustomMarkers: { type: [CustomMarkersSchema], default: undefined },
1170
1136
1171
//Unknown and system
1137
1172
DuviriInfo: DuviriInfoSchema,
1138
1173
Mailbox: MailboxSchema,
@@ -155,6 +155,20 @@ export const addMissionInventoryUpdates = (
155
155
inventory.PlayerSkills.LPP_DRIFTER += value.LPP_DRIFTER;
156
156
break;
157
157
}
158
case "CustomMarkers": {
159
value.forEach(markers => {
160
const map = inventory.CustomMarkers
161
? inventory.CustomMarkers.find(entry => entry.tag == markers.tag)
162
: undefined;
163
if (map) {
164
map.markerInfos = markers.markerInfos;
165
} else {
166
inventory.CustomMarkers ??= [];
167
inventory.CustomMarkers.push(markers);
168
}
169
});
170
break;
171
}
158
172
default:
159
173
// Equipment XP updates
160
174
if (equipmentKeys.includes(key as TEquipmentKey)) {
@@ -343,6 +343,7 @@ export interface IInventoryClient extends IDailyAffiliations {
343
343
LastInventorySync: IOid;
344
344
NextRefill: IMongoDate; // Next time argon crystals will have a decay tick
345
345
FoundToday?: IMiscItem[]; // for Argon Crystals
346
CustomMarkers: ICustomMarkers[];
346
347
ActiveLandscapeTraps: any[];
347
348
EvolutionProgress?: IEvolutionProgress[];
348
349
RepVotes: any[];
@@ -1056,3 +1057,23 @@ export interface ICompletedDialogue {
1056
1057
Booleans: string[];
1057
1058
Choices: number[];
1058
1059
}
1060
1061
export interface ICustomMarkers {
1062
tag: string;
1063
markerInfos: IMarkerInfo[];
1064
}
1065
1066
export interface IMarkerInfo {
1067
icon: string;
1068
markers: IMarker[];
1069
}
1070
1071
export interface IMarker {
1072
anchorName: string;
1073
color: number;
1074
label?: string;
1075
x: number;
1076
y: number;
1077
z: number;
1078
showInHud: boolean;
1079
}
@@ -11,6 +11,7 @@ import {
11
11
TSolarMapRegion,
12
12
TEquipmentKey,
13
13
IFusionTreasure,
14
ICustomMarkers,
14
15
IPlayerSkills,
15
16
IQuestKeyDatabase
16
17
} from "./inventoryTypes/inventoryTypes";
@@ -75,6 +76,7 @@ export type IMissionInventoryUpdateRequest = {
75
76
EvolutionProgress?: IEvolutionProgress[];
76
77
FocusXpIncreases?: number[];
77
78
PlayerSkillGains: IPlayerSkills;
79
CustomMarkers?: ICustomMarkers[];
78
80
} & {
79
81
[K in TEquipmentKey]?: IEquipmentClient[];
80
82
};