feat: loc-pin saving #485

Closed
AMelonInsideLemon wants to merge 2 commits from AMelonInsideLemon/custom-markers into main
2 changed files with 3 additions and 1 deletions
Showing only changes of commit 7fc60e70f2 - Show all commits

View File

@ -933,7 +933,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
EvolutionProgress: { type: [evolutionProgressSchema], default: undefined },
//https://warframe.fandom.com/wiki/Loc-Pin
CustomMarkers: [CustomMarkersSchema],
CustomMarkers: { type: [CustomMarkersSchema], default: undefined },
//Unknown and system
DuviriInfo: DuviriInfoSchema,

View File

@ -794,9 +794,11 @@ export const missionInventoryUpdate = async (data: IMissionInventoryUpdateReques
: undefined;
if (map) {
map.markerInfos = markers.markerInfos;
inventory.markModified("CustomMarkers");
} else {
inventory.CustomMarkers ??= [];
inventory.CustomMarkers.push(markers);
inventory.markModified("CustomMarkers");
}
});
}