Skip to content

Commit

Permalink
Changes to filter for processSkyblock (slothpixel#657)
Browse files Browse the repository at this point in the history
* Added starred items and items with the Thick modifier to the processSkyblock filter

* Changed star and thick filter to startsWith and endsWith

* Whoops, typo

* moved filter to removeFormatting, added filter for wood singularity, fixed upgraded rarity filter

* moved previous change
  • Loading branch information
MattTheCuber authored and ChristianDobbie committed Jan 10, 2022
1 parent d1b9686 commit 287fdd0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ module.exports = [
'2cf9d8ca459a4c5cbf8911eeef146d6f', // Mythbusters123
'7c0da4ba54fa40df82309200e69d328e', // ImRodry
'763b4f2684d94edeaf4f61522cd7c1b9', // Squagward
'40d803128602485382a112c60cfe84ae', // MattTheCuber
];
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,8 @@
},
"engines": {
"node": ">=10"
},
"jshintConfig":{
"esversion": 10
}
}
8 changes: 4 additions & 4 deletions processors/processSkyBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ async function checkItems(members = {}) {
if (![null, undefined].includes(item.attributes.modifier)
|| id.startsWith('MAP:')
|| item.name === '§fnull'
|| item.name.endsWith('✪')
|| item.name.startsWith('Thick ')
|| !/[!-~]/.test(item.name) || !/[!-~]/.test(item.type)
|| item.rarity_upgrades) return [];
|| !item.name.match(/[a-z]/i)
|| item.attributes.wood_singularity_count
|| item.attributes.rarity_upgrades) return [];
return [{
id,
name: removeFormatting(item.name),
name: removeFormatting(item.name).replace(/⚚|✦|✪/g, '').trim(),
tier: item.rarity,
category: item.type || 'misc',
damage: item.damage || null,
Expand Down

0 comments on commit 287fdd0

Please sign in to comment.