-
Notifications
You must be signed in to change notification settings - Fork 723
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
Core: Add item.filler helper #4081
Conversation
BaseClasses.py
Outdated
@@ -1264,6 +1264,10 @@ def useful(self) -> bool: | |||
def trap(self) -> bool: | |||
return ItemClassification.trap in self.classification | |||
|
|||
@property | |||
def filler(self) -> bool: | |||
return not self.classification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏
I think this should be |
So the idea is that world-added flags can't change the "filler" status because filler is defined as a lack of trap/useful/progression? Thoughts on just being explicit with |
I think I would say so. With the exception of trap ( :/ ), flags determine how core handles the item, and there is no way for a world to affect that with custom bits on the bitflag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this in my apworld by pulling it in and verifying I could use it in my logic as expected (tests setup around this continued to pass, I verified they were not false positives)
def is_hintable_filler_item(item: Item) -> bool:
return item.filler and CivVIHintClassification.FILLER.value in self.options.pre_hint_items.value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, this is what I'd expect such a helper to do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marked for merge after hotfix window
How am I actually going to remember which PRs I've "marked for merge"? I didn't think this through
Add waiting on other tag |
What is this fixing or adding?
Adds
item.filler
to go withitem.advancement
,item.useful
, anditem.trap
How was this tested?
Tested by modifying Metroid Prime's code to use it