diff --git a/configs/config.json.cluster.example b/configs/config.json.cluster.example index a032ab41f3..1d98476c4c 100644 --- a/configs/config.json.cluster.example +++ b/configs/config.json.cluster.example @@ -157,6 +157,8 @@ "show_at_start": true, "// if 'show_count' is true, it will show the amount of each pokemon (minimum 1)": {}, "show_count": false, + "// if 'show_candies' is true, it will show the amount of candies for each pokemon": {}, + "show_candies": false, "// 'pokemon_info' parameter define which info to show for each pokemon": {}, "// the available options are": {}, "// ['cp', 'iv_ads', 'iv_pct', 'ivcp', 'ncp', 'level', 'hp', 'moveset', 'dps']": {}, diff --git a/configs/config.json.example b/configs/config.json.example index 8fecc12c93..dea95f08d9 100644 --- a/configs/config.json.example +++ b/configs/config.json.example @@ -178,6 +178,8 @@ "show_at_start": true, "// if 'show_count' is true, it will show the amount of each pokemon (minimum 1)": {}, "show_count": false, + "// if 'show_candies' is true, it will show the amount of candies for each pokemon": {}, + "show_candies": false, "// 'pokemon_info' parameter define which info to show for each pokemon": {}, "// the available options are": {}, "// ['cp', 'iv_ads', 'iv_pct', 'ivcp', 'ncp', 'level', 'hp', 'moveset', 'dps']": {}, diff --git a/configs/config.json.map.example b/configs/config.json.map.example index 1d0ea3dd47..f4ebed1e76 100644 --- a/configs/config.json.map.example +++ b/configs/config.json.map.example @@ -411,6 +411,8 @@ "show_at_start": true, "// if 'show_count' is true, it will show the amount of each pokemon (minimum 1)": {}, "show_count": false, + "// if 'show_candies' is true, it will show the amount of candies for each pokemon": {}, + "show_candies": false, "// 'pokemon_info' parameter define which info to show for each pokemon": {}, "// the available options are": {}, "// ['cp', 'iv_ads', 'iv_pct', 'ivcp', 'ncp', 'level', 'hp', 'moveset', 'dps']": {}, diff --git a/configs/config.json.optimizer.example b/configs/config.json.optimizer.example index 96bc5f037b..1e4b9c159c 100644 --- a/configs/config.json.optimizer.example +++ b/configs/config.json.optimizer.example @@ -230,6 +230,8 @@ "show_at_start": true, "// if 'show_count' is true, it will show the amount of each pokemon (minimum 1)": {}, "show_count": false, + "// if 'show_candies' is true, it will show the amount of candies for each pokemon": {}, + "show_candies": false, "// 'pokemon_info' parameter define which info to show for each pokemon": {}, "// the available options are": {}, "// ['cp', 'iv_ads', 'iv_pct', 'ivcp', 'ncp', 'level', 'hp', 'moveset', 'dps']": {}, diff --git a/configs/config.json.path.example b/configs/config.json.path.example index 1a447ee20e..4e6f2da096 100644 --- a/configs/config.json.path.example +++ b/configs/config.json.path.example @@ -161,6 +161,8 @@ "show_at_start": true, "// if 'show_count' is true, it will show the amount of each pokemon (minimum 1)": {}, "show_count": false, + "// if 'show_candies' is true, it will show the amount of candies for each pokemon": {}, + "show_candies": false, "// 'pokemon_info' parameter define which info to show for each pokemon": {}, "// the available options are": {}, "// ['cp', 'iv_ads', 'iv_pct', 'ivcp', 'ncp', 'level', 'hp', 'moveset', 'dps']": {}, diff --git a/configs/config.json.pokemon.example b/configs/config.json.pokemon.example index de5ca89e84..c0c489eba3 100644 --- a/configs/config.json.pokemon.example +++ b/configs/config.json.pokemon.example @@ -165,6 +165,8 @@ "show_at_start": true, "// if 'show_count' is true, it will show the amount of each pokemon (minimum 1)": {}, "show_count": false, + "// if 'show_candies' is true, it will show the amount of candies for each pokemon": {}, + "show_candies": false, "// 'pokemon_info' parameter define which info to show for each pokemon": {}, "// the available options are": {}, "// ['cp', 'iv_ads', 'iv_pct', 'ivcp', 'ncp', 'level', 'hp', 'moveset', 'dps']": {}, diff --git a/pokecli.py b/pokecli.py index 30c5428212..f8ed507640 100644 --- a/pokecli.py +++ b/pokecli.py @@ -488,6 +488,14 @@ def _json_loader(filename): type=bool, default=False ) + add_config( + parser, + load, + long_flag="--pokemon_bag.show_candies", + help="Shows the amount of candies for each pokemon", + type=bool, + default=False + ) add_config( parser, load, diff --git a/pokemongo_bot/__init__.py b/pokemongo_bot/__init__.py index d6166d8ec9..5e85cfdec8 100644 --- a/pokemongo_bot/__init__.py +++ b/pokemongo_bot/__init__.py @@ -901,6 +901,7 @@ def _print_list_pokemon(self): pokemon_list = [filter(lambda x: x.pokemon_id == y, bag) for y in id_list] show_count = self.config.pokemon_bag_show_count + show_candies = self.config.pokemon_bag_show_candies poke_info_displayed = self.config.pokemon_bag_pokemon_info def get_poke_info(info, pokemon): @@ -925,6 +926,8 @@ def get_poke_info(info, pokemon): line_p = '#{} {}'.format(pokes[0].pokemon_id, pokes[0].name) if show_count: line_p += '[{}]'.format(len(pokes)) + if show_candies: + line_p += '[{} candies]'.format(pokes[0].candy_quantity) line_p += ': ' poke_info = ['({})'.format(', '.join([get_poke_info(x, p) for x in poke_info_displayed])) for p in pokes]