Closed Maistho closed 4 years ago
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.
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:
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 withsmoke
,a
andretake
.throw smoke|a
would throw any saved nades that are categorised with eithersmoke
ora
.throw smoke&b|smoke&a
would throw any saved nades that are categorised with eithersmoke
anda
orsmoke
andb
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.