Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion configs/config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
}
],
"max_steps": 5,
"catch_pokemon": true,
"forts": {
"spin": true,
"move_to_spin": true,
Expand Down
1 change: 0 additions & 1 deletion configs/config.json.path.example
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
}
],
"max_steps": 5,
"catch_pokemon": true,
"forts": {
"spin": true,
"move_to_spin": false,
Expand Down
1 change: 0 additions & 1 deletion configs/config.json.pokemon.example
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
}
],
"max_steps": 5,
"catch_pokemon": true,
"forts": {
"spin": true,
"move_to_spin": true,
Expand Down
24 changes: 13 additions & 11 deletions pokecli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions pokemongo_bot/cell_workers/catch_lured_pokemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions pokemongo_bot/cell_workers/catch_visible_pokemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down