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

Improved handling for some edge cases with the maximum radius feature #364

Merged
merged 3 commits into from
Jul 24, 2016

Conversation

Daylend
Copy link
Contributor

@Daylend Daylend commented Jul 24, 2016

A few users were confused when the program would endlessly list their highest Pokemon. This should hopefully fix that.

@c-zar
Copy link

c-zar commented Jul 24, 2016

Still keeps listing it. :(

@Daylend
Copy link
Contributor Author

Daylend commented Jul 24, 2016

@qaqsd123 Does it at least give a warning saying there are no PokeStops nearby? Because it should.

@c-zar
Copy link

c-zar commented Jul 24, 2016

Didn't get that far

On Sun, Jul 24, 2016, 3:02 AM Daylend notifications@github.com wrote:

@qaqsd123 https://github.com/qaqsd123 Does it at least give a warning
saying there are no PokeStops nearby?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#364 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATQZftgvFWgO7n-IG40C34lF1CdaXcgTks5qYw4cgaJpZM4JThGS
.

@Daylend
Copy link
Contributor Author

Daylend commented Jul 24, 2016

Coords.ini is used to store the last location the bot was at. If limiting the distance was based on Coords.ini, it wouldn't be limiting the distance at all. It would only be able to travel to PokeStops x meters away from its current position, which is NOT what was intended. If you use the first coords found in Coords.ini, you would slowly drift away from your original position as the bot is reset, eventually having to put new coordinates in to keep the bot in the same place.

This PR prevents edge cases where you somehow get away from the predefined boundaries. This usually happens when a user forgets to clear their Coords.ini file before moving to a new start location as set in UserSettings.settings.

The point is to allow the user to save their position regardless of where they roam and continue where they left off, but keep them within a predefined area that doesn't change.

Edit: This was a reply to a now deleted comment.

@cvax
Copy link
Contributor

cvax commented Jul 24, 2016

You are right. How about renaming Coords.ini to LastCoords.ini then to avoid confusion?

@Daylend
Copy link
Contributor Author

Daylend commented Jul 24, 2016

Sure. Someone just needs to put up a PR. Feel free to if you'd like.

@cvax
Copy link
Contributor

cvax commented Jul 24, 2016

Also, if we are already going to walk back to the start, shouldn't we be spinning PokeStops along the way instead of just catching Pokemon? Could be a real long walk if someone was jumping across the country and didn't change both coords.

@Daylend
Copy link
Contributor Author

Daylend commented Jul 24, 2016

Someone shouldn't be using this to walk across the country. This is for the cases where the bot is a minimal distance away from the radius. Otherwise they should see the message generated and restart the bot with the proper coordinates.

@ThomasSRL
Copy link

Dont worry @Daylend , it seems perfect as is! Hope it gets accepted!

@NecronomiconCoding NecronomiconCoding merged commit 771c190 into NecronomiconCoding:master Jul 24, 2016
Kongolan pushed a commit to Kongolan/PokemoGoBot-GottaCatchEmAll that referenced this pull request Aug 10, 2016
Kongolan pushed a commit to Kongolan/PokemoGoBot-GottaCatchEmAll that referenced this pull request Aug 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants