-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
keep improving inventory by recycling based on type filter; #3135
Conversation
It's better not to silently override item_filter, but throw exception. Why to keep config parts that doesn't work (overridden)? |
{ | ||
"type": "RecycleItems", | ||
"config": { | ||
"type_filter": { |
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.
Perhaps this doesn't need its own config. You could add it to the other one and change this key to
"// type_filter"
This looks great. It seems like you have merge conflicts, can you fix those? @douglascamata Please review when you get the chance |
@tiagoAnon can you solve merge conflicts, please? |
…nc most of the time; moved common code around
I did one last change, because the feature was causing a lot of logging noise due to some lack of sync of the inventory somewhere on the bot. Changed it to keep some unallocated space empty (based on the configuration). It seems to merge OK with Dev. |
@tiagoAnon please, split your logic in many smaller methods. The way it is now is very complicated to read and understand. |
I want type_filter |
@BriceSD, is there something we can do here to utilize inventory calls instead of all these checks on the response object? |
@tiagoAnon This feature seems awesome, please update it to use the latest items_recycle. I really want to use it :D @TheSavior Yes we should use the new inventory here. We should also add methods in the Items class to access to the lowest ball/potion/revive/etc. available, to get every member of the type ball/berry/potion/revive/etc. These could be reuse somewhere else, like in the pokemon_catcher to choose the type of ball that should be thrown. |
Maybe should make a completely new PR? it have been lot of changes to the recycle script |
Merged #4005. We have this feature now. |
Short Description:
Enables inventory improving by setting a configuration for how much of each item type to keep and recycling the worst items.
Fixes:
Notes:
I haven't worked with Python for 5+ years, but I hope it's up to your standards ;)