fix: increment LoreFragmentScans Progress when already present (#1022)
Some checks failed
Build Docker image / docker (push) Waiting to run
Build / build (18) (push) Has been cancelled
Build / build (20) (push) Has been cancelled
Build / build (22) (push) Has been cancelled

Fixes #1021

Reviewed-on: #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": {