Skip to content
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

API improvements for equipment #104

Merged
merged 14 commits into from Jan 25, 2023
Merged

API improvements for equipment #104

merged 14 commits into from Jan 25, 2023

Conversation

redtortuga19
Copy link
Contributor

get_all_tagged_in_rect direction_sort parameter added for North, South, East, and West directions. This functionality makes it easier to navigate from A to B by placing tile markers on the ground.

@kelltom kelltom added status: will revisit Will be revisited in the future type: enhancement This issue or pull request enhances existing code labels Jan 19, 2023
@redtortuga19
Copy link
Contributor Author

@kelltom Sorry for the multiple features in one pull request, I'll make a new branch for each feature in the future. I thought that pushing this new code to my main branch would let me open a new pull request instead of modifying this one.

Additions:
get_is_item_equipped in morg_http_client. This lets us get around the wonky behavior in get_player_equipment placing additional -1s and you can just directly check if a certain item is equipped.

get_is_inv_empty in status_socket. Just a nice little function to check if inv is empty because the opposite of get_is_inv_full isn't necessarily empty and vice versa.

These 2 new functions and the direction_sort have all been tested with my bots.

@redtortuga19 redtortuga19 changed the title direction_sort by cardinal directions added to get_all_tagged_in_rect direction_sort by cardinal directions for get_all_tagged_in_rect, get_is_item_equipped, get_is_inv_empty Jan 21, 2023
src/model/runelite_bot.py Outdated Show resolved Hide resolved
@kelltom
Copy link
Owner

kelltom commented Jan 22, 2023

I'd be willing to convert this PR to a title of API improvements for equipment and pull in those changes. I'm a bit hesitant to include the cardinal sort when it has potential side effects should the camera not be north.

If you want, I can revert those changes and accept the merge. Then maybe a future PR could be made if you happen to find a way to do cardinal sort with consideration of the camera.

@kelltom kelltom added status: under review This issue or pull request has an unresolved review. and removed status: will revisit Will be revisited in the future labels Jan 22, 2023
@kelltom kelltom changed the title direction_sort by cardinal directions for get_all_tagged_in_rect, get_is_item_equipped, get_is_inv_empty API improvements for equipment Jan 25, 2023
@kelltom kelltom merged commit f30f3f2 into kelltom:main Jan 25, 2023
@kelltom kelltom added status: confirmed and removed status: under review This issue or pull request has an unresolved review. labels Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement This issue or pull request enhances existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants