Skip to content

Commit

Permalink
Added map_path configuration for move_to_map. (#3339)
Browse files Browse the repository at this point in the history
  • Loading branch information
solderzzc authored Aug 9, 2016
1 parent 9172937 commit 3519c31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions configs/config.json.map.example
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"snipe_high_prio_threshold": 400,
"update_map": true,
"mode": "priority",
"map_path": "raw_data",
"catch": {
"==========Legendaries==========": 0,
"Aerodactyl": 1000,
Expand Down
3 changes: 2 additions & 1 deletion pokemongo_bot/cell_workers/move_to_map_pokemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def initialize(self):
self.unit = self.bot.config.distance_unit
self.caught = []
self.min_ball = self.config.get('min_ball', 1)
self.map_path = self.config.get('map_path', 'raw_data')

data_file = os.path.join(_base_dir, 'map-caught-{}.json'.format(self.bot.config.username))
if os.path.isfile(data_file):
Expand All @@ -93,7 +94,7 @@ def initialize(self):

def get_pokemon_from_map(self):
try:
req = requests.get('{}/raw_data?gyms=false&scanned=false'.format(self.config['address']))
req = requests.get('{}/{}?gyms=false&scanned=false'.format(self.config['address'], self.map_path))
except requests.exceptions.ConnectionError:
self._emit_failure('Could not get Pokemon data from PokemonGo-Map: '
'{}. Is it running?'.format(
Expand Down

1 comment on commit 3519c31

@YvesHenri
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of this PR?

Please sign in to comment.