Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow .throw to filter on multiple categories #123

Closed
Maistho opened this issue Jul 9, 2019 · 1 comment · Fixed by #129
Closed

Allow .throw to filter on multiple categories #123

Maistho opened this issue Jul 9, 2019 · 1 comment · Fixed by #129

Comments

@Maistho
Copy link
Contributor

Maistho commented Jul 9, 2019

I'm thinking of opening a PR to add a method to filter on multiple categories when using .throw.

My idea is to add two boolean operators & (AND) and | (OR) that can be used when filtering categories.

Use-case:

We would like to categorise our nades with categories such as:

  • a
  • b
  • smoke
  • take
  • hold
  • retake
  • flash
  • long
  • mid
    etc...

Then it would be nice to be able to throw all smokes to retake A by combining the categories.

For example:

.throw smoke&a&retake would throw any saved nades that are categorised with smoke, a and retake

.throw smoke|a would throw any saved nades that are categorised with either smoke or a

.throw smoke&b|smoke&a would throw any saved nades that are categorised with either smoke and a or smoke and b

Is this something that you would be open to merging?

I'm still not fully decided on adding both AND and OR, I can't think of very many usecases for OR so I might only add AND to start with.

It would be a breaking change for anyone currently using & or | in their category names, but I don't expect many people to do so.

@splewis
Copy link
Owner

splewis commented Aug 10, 2019

I'm still not fully decided on adding both AND and OR, I can't think of very many usecases for OR so I might only add AND to start with.

Agreed.

It would be a breaking change for anyone currently using & or | in their category names, but I don't expect many people to do so.

Also agreed. It might be worth a cvar to disable the behavior, just in case someone is using them.

Is this something that you would be open to merging?

Sure, as long as the implementation is relatively straightforward, and I think it should be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants