[src/lib/filter] Add New Method seedInList #341
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
seedInList
allows users to filter for items that satisfy a list of paint seeds they are looking for. This is particularly useful for people who are looking for tier1/tier2/tier3 patterns, which each have 30+ paint seeds and can be quite tedious to search for.E.g. seed == 301 or seed == 625 or ... or seed == 540 gets annoying pretty quick and most people do manual cmd/crtl + f searches or use a custom script.
Examples:


Implementation Details + Demo (ran dev build in chrome)
Most pattern guides for CS2 are made by korenevskiy, and those that aren't mostly follow his formatting.
I've classified the two most common ways guides list the pattern seeds:
The implementation will allow us to directly copy and paste the numbers from the images above and pass it into our new method.
Example One (most common case, seeds separated by seeds):

Example Two (with commas this time):

Future Work
Once approved, will need to add this method to
filter_help.ts
so users can see and understand how to use this method properly. Can probably find a better name for this method as well so it's more intuitive to users.Also, this feature would be extremely useful for the csfloat market search filters as well. But I'm not sure how they go about receiving feature ideas from the public.