Error: When specifying an item that didn't exactly match one of the keys in weightDict, was throwing a divide by zero error.
Fix: bundle = matchItem.get("bundle", 1) if typeof(matchItem) == 'SafeDict' else 1
Improvement: Added function to grab a list of fuzzy/partial matches. The buy command will now only do the buy if it has a match, and show some options if an exact match couldn't be found. "buy dag" will work to buy a dagger, "buy sword" will list the items that contain the word 'sword'.
Checklist
PR Type
[ ] This PR is a code change that implements a feature request.
[x] This PR fixes an issue.
[x] This PR adds a new feature that is not an open feature request.
[ ] This PR is not a code change (e.g. documentation, README, ...)
Other
[ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
[x] If code changes were made then they have been tested.
[ ] I have updated the documentation to reflect the changes.
[x] I properly commented my code where appropriate
What Alias/Snippet is this for?
bag
Summary
Error: When specifying an item that didn't exactly match one of the keys in weightDict, was throwing a divide by zero error. Fix: bundle = matchItem.get("bundle", 1) if typeof(matchItem) == 'SafeDict' else 1
Improvement: Added function to grab a list of fuzzy/partial matches. The
buy
command will now only do the buy if it has a match, and show some options if an exact match couldn't be found. "buy dag" will work to buy a dagger, "buy sword" will list the items that contain the word 'sword'.Checklist
PR Type
Other