Skip to content

Commit

Permalink
improve new item processing
Browse files Browse the repository at this point in the history
  • Loading branch information
Razzmatazzz committed Nov 20, 2024
1 parent 884a280 commit 311c50c
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions src/tarkov-data-manager/jobs/update-new-items.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ class UpdateNewItemsJob extends DataJob {
return false;
}

if (secureContainers.includes(bsgObject._id)) {
return true;
}

if (ignoreMap.includes(bsgObject._id)) {
return false;
}
Expand All @@ -40,10 +36,10 @@ class UpdateNewItemsJob extends DataJob {
return false;
}

// Parent is MobContainer
// Removes all secure containers, which is why we do the above check first
// Parent is MobContainer (secure containers)
if (bsgObject._parent === '5448bf274bdc2dfc2f8b456a') {
return false;
// skip secure containers that are too big
return !bsgObject._props.Grids.some(grid => grid._props.cellsH >= 10 || grid._props.cellsV >= 10);
}

// Parent is Stash
Expand Down Expand Up @@ -83,6 +79,11 @@ class UpdateNewItemsJob extends DataJob {
return false;
}

// skip 999-round zombie magazines
if (bsgObject._parent === '5448bc234bdc2d3c308b4569' || bsgObject._parent === '610720f290b75a49ff2e5e25') {
return !bsgObject._props.Cartridges.some(cart => cart._max_count === 999);
}

return true;
});

Expand Down Expand Up @@ -170,14 +171,4 @@ const ignoreMap = [
'5751961824597720a31c09ac', // (off)black keycard
];

const secureContainers = [
'544a11ac4bdc2d470e8b456a', // alpha
'5857a8b324597729ab0a0e7d', // beta
'59db794186f77448bc595262', // epsilon
'5857a8bc2459772bad15db29', // gamma
'5c093ca986f7740a1867ab12', // kappa
'5732ee6a24597719ae0c0281', // waist pouch
'664a55d84a90fc2c8a6305c9', // theta
];

export default UpdateNewItemsJob;

0 comments on commit 311c50c

Please sign in to comment.