-
Notifications
You must be signed in to change notification settings - Fork 73
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
change a bunch of stuff to be multiple use #1807
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1807 +/- ##
============================================
- Coverage 36.33% 36.33% -0.01%
- Complexity 18762 18764 +2
============================================
Files 1081 1081
Lines 166346 166345 -1
Branches 35394 35394
============================================
- Hits 60437 60435 -2
- Misses 96036 96038 +2
+ Partials 9873 9872 -1
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
This will work. Thank you for fixing some potions from usable to multiple - based on your own observations. My comment on Shiverwarp's bug report left open an alternative solution: since ItemDatabase.isMultiUsable already assumes that type "avatar" is that (unless marked otherwise), perhaps UseItemRequest should use that existing method, rather than requiring that the "multiple" flag be set for all such potions in items.txt? I am not sure which is better. As I said, your solution works, but I want to think on it a bit more. |
It is long time since I responded to this. I'm on my phone, so can't call up code, but my response to the kolmafia.us bug report points to exactly the code I'd modify. The issue is this: given an itemId, UseItemRequest wants to decide if the item is multi usable. It looks only at Attributes: usable, multiple, reusable. ItemDatabase has methods: isUsable, isMultiUsable, and isReusable (or something). Those methods look at item types and also attributes. A potion or avatar is multi usable UNLESS it is specifically tagged "usable".
End result: In items.txt, every potion is simply "potion" (which implies multiple) or "potion, usable". |
Perhaps we should add a data file integrity test that enforces this? So you can't have multi usable on something also marked as a potion? |
Changed to draft because that is a filter I use. There are good ideas here but no activity in at least a week. |
OK, since I really want this PR, I did all of the suggestions:
This should be good to go. |
changed all avatar potions to be
avatar, multiple
and changed a bunch of stuff I found reported in my session logs over the past year to multiple.@Shiverwarp reported the avatar potions on https://kolmafia.us/threads/multi-usable-items.29006/ which I haven't personally tested or seen in a log as I haven't used any of them (it's mostly people in 2CRS consuming these) but I trust this is correct from Veracity's discussion on that thread.