feat: obtaining crewship related items on mission update #897

Merged
OrdisPrime merged 3 commits from AMelonInsideLemon/SpaceNinjaServer:crewship-rewards into main 2025-02-05 12:23:35 -08:00
Showing only changes of commit 5b525916d0 - Show all commits

View File

@ -926,7 +926,6 @@ export const addCrewShipRawSalvage = (
if (itemIndex !== -1) {
CrewShipRawSalvage[itemIndex].ItemCount += ItemCount;
inventory.markModified(`CrewShipRawSalvage.${itemIndex}.ItemCount`);
} else {
Sainan marked this conversation as resolved
Review

markModified shouldn't be needed with a proper schema.

`markModified` shouldn't be needed with a proper schema.
CrewShipRawSalvage.push({ ItemCount, ItemType });
}
@ -941,7 +940,6 @@ export const addCrewShipAmmo = (inventory: TInventoryDatabaseDocument, itemsArra
if (itemIndex !== -1) {
CrewShipAmmo[itemIndex].ItemCount += ItemCount;
inventory.markModified(`CrewShipAmmo.${itemIndex}.ItemCount`);
} else {
CrewShipAmmo.push({ ItemCount, ItemType });
}