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

0.67.2 and gym support #6091

Merged
merged 26 commits into from
Jul 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c07fd94
Merge pull request #6076 from PokemonGoF/dev
solderzzc Jul 12, 2017
b5acdd5
Adding Gym Cell Worker to deal with Gym Messages
goedzo Jul 14, 2017
5f6b963
Enable GymPokemon worker
goedzo Jul 14, 2017
5953744
Making sure that the event of deploying a mon is shown in green
goedzo Jul 14, 2017
b77af34
Share the feeding event
goedzo Jul 14, 2017
2e65068
Adding config sample and setting correct base config
goedzo Jul 14, 2017
fba2c04
Update message frequency to be less chatty
goedzo Jul 14, 2017
2a19fdb
Allow feeding berries from Config file
goedzo Jul 14, 2017
461cd35
Testing the quantity to use for feeding
goedzo Jul 14, 2017
31a90db
Merge branch 'master' into Basic-Gym-Support
goedzo Jul 14, 2017
8d41601
Adding support to find gyms in range
goedzo Jul 14, 2017
d17c4e1
Bugfixes and disabled berry feeding
goedzo Jul 15, 2017
dc7711c
Merge pull request #2 from goedzo/Basic-Gym-Support
goedzo Jul 15, 2017
aa306d4
Fix for gyms not sharing their defenders
goedzo Jul 15, 2017
ac151a8
Stop moving if running fails
goedzo Jul 15, 2017
4548311
Gym Deployment finalized
goedzo Jul 16, 2017
9a9b7a6
Full API Support for 0.67.2 based on latest compile from POGOProtos
goedzo Jul 17, 2017
5ffcfc8
Merge branch 'dev' into Basic-Gym-Support
goedzo Jul 17, 2017
e32cd14
Merge pull request #5 from PokemonGoF/dev
goedzo Jul 17, 2017
3d5f6a0
Merge pull request #6 from goedzo/HealPokemon-Fix
goedzo Jul 17, 2017
ea3e660
Merge branch 'Debug_2017_07_18' into Basic-Gym-Support
goedzo Jul 17, 2017
851da62
Merge pull request #7 from goedzo/Basic-Gym-Support
goedzo Jul 17, 2017
d6bcbd5
Making sure we are all fixed now
goedzo Jul 18, 2017
59455ed
Merge pull request #8 from goedzo/Full-0.67.2-Support
goedzo Jul 18, 2017
2f9ab17
Removed unused config
davidakachaos Jul 18, 2017
db9f99f
Removed unused event
davidakachaos Jul 18, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions configs/config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,16 @@
"enabled": true
}
},
{
"type": "GymPokemon",
"config": {
"enabled": false,
"order_by": "cp",
"min_interval":360,
"min_recheck":30,
"max_recheck":120
}
},
{
"type": "MoveToFort",
"config": {
Expand All @@ -482,6 +492,7 @@
"step_size": 70
}
}

],
"map_object_cache_time": 5,
"forts": {
Expand Down
19 changes: 19 additions & 0 deletions pokemongo_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1727,6 +1727,25 @@ def get_forts(self, order_by_distance=False):
))

return forts

def get_gyms(self, order_by_distance=False):
forts = [fort
for fort in self.cell['forts']
if 'latitude' in fort and 'type' not in fort]
# Need to filter out disabled gyms!
forts = filter(lambda x: x["enabled"] is True, forts)
forts = filter(lambda x: 'closed' not in fort, forts)
# forts = filter(lambda x: 'type' not in fort, forts)

if order_by_distance:
forts.sort(key=lambda x: distance(
self.position[0],
self.position[1],
x['latitude'],
x['longitude']
))

return forts

def get_map_objects(self, lat, lng, timestamp, cellid):
if time.time() - self.last_time_map_object < self.config.map_object_cache_time:
Expand Down
1 change: 1 addition & 0 deletions pokemongo_bot/cell_workers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@
from .update_hash_stats import UpdateHashStats
from .bad_pokemon import BadPokemon
from .heal_pokemon import HealPokemon
from .gym_pokemon import GymPokemon
Loading