fix: increment LoreFragmentScans Progress when already present (#1022)

Fixes #1021

Reviewed-on: OpenWF/SpaceNinjaServer#1022
Co-authored-by: Sainan <sainan@calamity.inc>
Co-committed-by: Sainan <sainan@calamity.inc>
This commit is contained in:
Sainan 2025-02-25 17:31:24 -08:00 committed by OrdisPrime
parent 8fea608b76
commit 2b8da4af60

View File

@ -176,8 +176,13 @@ export const addMissionInventoryUpdates = (
break; break;
} }
case "LoreFragmentScans": case "LoreFragmentScans":
value.forEach(x => { value.forEach(clientFragment => {
inventory.LoreFragmentScans.push(x); const fragment = inventory.LoreFragmentScans.find(x => x.ItemType == clientFragment.ItemType);
if (fragment) {
fragment.Progress += clientFragment.Progress;
} else {
inventory.LoreFragmentScans.push(clientFragment);
}
}); });
break; break;
case "SyndicateId": { case "SyndicateId": {