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 a new target option to configure whether all items should be required #60

Closed
wants to merge 1 commit into from

Conversation

GryTrean
Copy link

Adds a new option when creating a target: 'itemsAny? = bool`. If itemsAny is set to true, the "items" option will be joined with an or statement rather than an and statement, meaning that the items option will be treated like an "array of items, where at least one of the items is required to show the option".

This gives developers the option to, for instance - allow using one of multiple items to slash a tire.

thelindat added a commit that referenced this pull request Feb 15, 2023
See #60. PR code was somewhat messy and repeated most of the code
in the backing function (PlayerHasItems), mostly due to it being
defined in multiple locations.
@thelindat
Copy link
Member

With 13608d3 cleaning up PlayerHasItems, I've implemented this slightly differently in 2d6bd94.

@thelindat thelindat closed this Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants