From 479b464a130359f2c393aef19ef49abb71a3af0e Mon Sep 17 00:00:00 2001 From: Simba Zhang Date: Tue, 9 Aug 2016 12:12:57 -0700 Subject: [PATCH] Added map_path configuration for move_to_map. --- configs/config.json.map.example | 1 + pokemongo_bot/cell_workers/move_to_map_pokemon.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/configs/config.json.map.example b/configs/config.json.map.example index bb6878f5ac..56a006450c 100644 --- a/configs/config.json.map.example +++ b/configs/config.json.map.example @@ -66,6 +66,7 @@ "snipe_high_prio_threshold": 400, "update_map": true, "mode": "priority", + "map_path": "raw_data", "catch": { "==========Legendaries==========": 0, "Aerodactyl": 1000, diff --git a/pokemongo_bot/cell_workers/move_to_map_pokemon.py b/pokemongo_bot/cell_workers/move_to_map_pokemon.py index 7ff0eb1cf4..efd058ca96 100644 --- a/pokemongo_bot/cell_workers/move_to_map_pokemon.py +++ b/pokemongo_bot/cell_workers/move_to_map_pokemon.py @@ -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): @@ -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(