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
Cookbookbat recipe drops tracking #1252
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1252 +/- ##
============================================
+ Coverage 32.47% 32.50% +0.03%
Complexity 16060 16060
============================================
Files 1042 1042
Lines 162349 162355 +6
Branches 35251 35254 +3
============================================
+ Hits 52727 52781 +54
+ Misses 100349 100290 -59
- Partials 9273 9284 +11
Continue to review full report at Codecov.
|
I thought only one can drop a day? Also will this trigger from the item you get when initially using the hatchling? I assume not, but worth inspecting. |
Yeah, it is set up for there to be 1 recipe drop per day, I could switch the property to a boolean, but with a counter it would make any accidental overcounting really obvious. I added the check for active familiar when updating the property which should prevent that first recipe from counting. I would be interested to see if buying a recipe from the mall with a cookbookbat active causes issues, but it seems like a pretty niche edge case. |
Actually, since you have that inside "if (adventureResults)", that should be enough. |
Make it a boolean pref. If you're worried about overcounting add test cases to confirm that it doesn't happen! |
So the drops familiar logic only appears to work with numbers https://github.com/kolmafia/kolmafia/blob/main/src/net/sourceforge/kolmafia/swingui/panel/DailyDeedsPanel.java#L2818-L2836 so it has to be an int without some more significant refactoring, you can see that there are already other drop familiars with only one drop per day: https://github.com/kolmafia/kolmafia/blob/main/src/net/sourceforge/kolmafia/FamiliarData.java#L1092-L1098 |
Would this work as a solution for https://github.com/kolmafia/kolmafia/blob/main/src/net/sourceforge/kolmafia/FamiliarData.java#L1014 or would it be too messy/hacky?
|
I think that's exactly the right solution |
I will convert all the other 1 drop familiars to booleans in another PR |
Adding a property to track cookbookbat recipe drops and setting it up as a drops familiar