diff --git a/configs/config.json.example b/configs/config.json.example index 309ae0771c..a41c5add3b 100644 --- a/configs/config.json.example +++ b/configs/config.json.example @@ -37,7 +37,6 @@ } ], "max_steps": 5, - "catch_pokemon": true, "forts": { "spin": true, "move_to_spin": true, diff --git a/configs/config.json.path.example b/configs/config.json.path.example index d3a7c68ceb..acc2614cc9 100644 --- a/configs/config.json.path.example +++ b/configs/config.json.path.example @@ -37,7 +37,6 @@ } ], "max_steps": 5, - "catch_pokemon": true, "forts": { "spin": true, "move_to_spin": false, diff --git a/configs/config.json.pokemon.example b/configs/config.json.pokemon.example index ff3d2692e6..6de8d019e7 100644 --- a/configs/config.json.pokemon.example +++ b/configs/config.json.pokemon.example @@ -37,7 +37,6 @@ } ], "max_steps": 5, - "catch_pokemon": true, "forts": { "spin": true, "move_to_spin": true, diff --git a/pokecli.py b/pokecli.py index ebd2530101..786c7d1085 100755 --- a/pokecli.py +++ b/pokecli.py @@ -178,14 +178,6 @@ def init_config(): type=bool, default=False ) - add_config( - parser, - load, - long_flag="--catch_pokemon", - help="Enable catching pokemon", - type=bool, - default=True - ) add_config( parser, load, @@ -425,9 +417,19 @@ def init_config(): logging.error("Invalid Auth service specified! ('ptc' or 'google')") return None - if 'mode' in load or 'mode' in config: - parser.error('"mode" has been removed and replaced with two new flags: "catch_pokemon" and "spin_forts". ' + - ' Set these to true or false and remove "mode" from your configuration') + def task_configuration_error(flag_name): + parser.error(""" + \"{}\" was removed from the configuration options. + You can now change the behavior of the bot by modifying the \"tasks\" key. + Read https://github.com/PokemonGoF/PokemonGo-Bot/wiki/Configuration-files#configuring-tasks for more information. + """.format(flag_name)) + + if 'mode' in load: + task_configuration_error("mode") + return None + + if 'catch_pokemon' in load: + task_configuration_error("catch_pokemon") return None if (config.evolve_captured diff --git a/pokemongo_bot/cell_workers/catch_lured_pokemon.py b/pokemongo_bot/cell_workers/catch_lured_pokemon.py index f4996a1274..93299002ce 100644 --- a/pokemongo_bot/cell_workers/catch_lured_pokemon.py +++ b/pokemongo_bot/cell_workers/catch_lured_pokemon.py @@ -8,9 +8,6 @@ def __init__(self, bot): self.bot = bot def work(self): - if not self.bot.config.catch_pokemon: - return - lured_pokemon = self.get_lured_pokemon() if lured_pokemon: self.catch_pokemon(lured_pokemon) diff --git a/pokemongo_bot/cell_workers/catch_visible_pokemon.py b/pokemongo_bot/cell_workers/catch_visible_pokemon.py index 06daa2e2cb..5a1e6174c2 100644 --- a/pokemongo_bot/cell_workers/catch_visible_pokemon.py +++ b/pokemongo_bot/cell_workers/catch_visible_pokemon.py @@ -10,9 +10,6 @@ def __init__(self, bot): self.bot = bot def work(self): - if not self.bot.config.catch_pokemon: - return - if 'catchable_pokemons' in self.bot.cell and len(self.bot.cell['catchable_pokemons']) > 0: logger.log('Something rustles nearby!') # Sort all by distance from current pos- eventually this should