Skip to content

Commit a0bfb36

Browse files
committed
Blacklist ammo from flea
1 parent ec0c79c commit a0bfb36

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/tarkov-data-manager/jobs/update-types.mjs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,15 @@ class UpdateTypesJob extends DataJob {
153153
this.logger.warn(`${itemId} ${item.name} lacks item properties`);
154154
continue;
155155
}
156-
if (item.types.includes('no-flea') && this.bsgData[itemId]._props.CanSellOnRagfair && this.bsgData[itemId]._parent !== '6575ea719c7cad336508e418') {
156+
if (item.types.includes('no-flea') && this.canSellOnFlea(this.bsgData[itemId])) {
157157
this.logger.warn(`You can sell ${itemId} ${item.name} on flea, but it is marked as noFlea`);
158158

159159
await remoteData.removeType(itemId, 'no-flea').then(results => {
160160
if (results.affectedRows == 0) {
161161
this.logger.fail(`Not marked as no-flea ${itemId} ${item.name}`);
162162
}
163163
});
164-
} else if (!item.types.includes('no-flea') && !this.bsgData[itemId]._props.CanSellOnRagfair) {
164+
} else if (!item.types.includes('no-flea') && !this.canSellOnFlea(this.bsgData[itemId])) {
165165
this.logger.warn(`You can't sell ${itemId} ${item.name} on flea`);
166166

167167
await remoteData.addType(itemId, 'no-flea').then(results => {
@@ -219,6 +219,19 @@ class UpdateTypesJob extends DataJob {
219219
}
220220
return false;
221221
}
222+
223+
canSellOnFlea = (item) => {
224+
if (!item._props.CanSellOnRagfair) {
225+
return false;
226+
}
227+
if (item._parent === '5485a8684bdc2da71d8b4567') { // ammo
228+
return false;
229+
}
230+
if (item._parent === '543be5cb4bdc2deb348b4568') { // ammo boxes
231+
return false;
232+
}
233+
return true;
234+
}
222235
}
223236

224237
export default UpdateTypesJob;

0 commit comments

Comments
 (0)