Skip to content

Commit

Permalink
hasdisabledmod filter
Browse files Browse the repository at this point in the history
  • Loading branch information
nev-r committed Jun 2, 2024
1 parent b78755b commit 3d157bc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@
"Y2": "Shows items with a Year 2 mod attached.",
"Y3": "Shows items with any Armor 2.0 mods selected."
},
"DisabledModSlot": "Shows items with a disabled mod.",
"ModSlot": "Shows armor with a specific Seasonal Mod slot.",
"HoldsMod": "Shows armor compatible with a specific type of Seasonal Mod.",
"Name": "Shows items whose name matches (exactname:) or partially matches (name:) the filter text. Search for entire phrases using quotes.",
Expand Down
10 changes: 10 additions & 0 deletions src/app/search/items/search-filters/sockets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,16 @@ const socketFilters: ItemFilterDefinition[] = [
),
),
},
{
keywords: 'hasdisabledmod',
description: tl('Filter.DisabledModSlot'),
destinyVersion: 2,

filter: () => (item) =>
item.sockets?.allSockets.some((socket) =>
Boolean(socket.plugged && socket.visibleInGame && !socket.plugged.enabled),
),
},
{
keywords: 'modded',
description: tl('Filter.Mods.Y3'),
Expand Down
1 change: 1 addition & 0 deletions src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@
"Deepsight": "Shows weapons with Deepsight Resonance, which can have their pattern extracted, or which can have Deepsight Resonance enabled using a Deepsight Harmonizer.",
"Description": "Description",
"DescriptionFilter": "Shows items whose description has a partial match to the filter text. Search for entire phrases using quotes.",
"DisabledModSlot": "Shows items with a disabled mod.",
"Dupe": "Shows duplicate items, including reissues",
"DupeCount": "Items that have the specified number of duplicates.",
"DupeLower": "Duplicate items, including reissues, that are not the highest power dupe. Only one duplicate is chosen as the highest, and the rest are considered lower.",
Expand Down

0 comments on commit 3d157bc

Please sign in to comment.