Skip to content

Commit

Permalink
Added PokemonBag to UpdateLiveInventory (#4360)
Browse files Browse the repository at this point in the history
* Added PokemonBag to UpdateLiveInventory

* Added documentation
  • Loading branch information
bohus-rosko authored and solderzzc committed Aug 20, 2016
1 parent 0f0c87e commit 48cb861
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion configs/config.json.cluster.example
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"enabled": false,
"min_interval": 120,
"show_all_multiple_lines": false,
"items": ["space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"]
"items": ["pokemon_bag", "space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"]
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion configs/config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"enabled": false,
"min_interval": 120,
"show_all_multiple_lines": false,
"items": ["space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"]
"items": ["pokemon_bag", "space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"]
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion configs/config.json.map.example
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"enabled": false,
"min_interval": 120,
"show_all_multiple_lines": false,
"items": ["space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"]
"items": ["pokemon_bag", "space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"]
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion configs/config.json.optimizer.example
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"enabled": false,
"min_interval": 120,
"show_all_multiple_lines": false,
"items": ["space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"]
"items": ["pokemon_bag", "space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"]
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion configs/config.json.path.example
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"enabled": false,
"min_interval": 120,
"show_all_multiple_lines": false,
"items": ["space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"]
"items": ["pokemon_bag", "space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"]
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion configs/config.json.pokemon.example
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"enabled": false,
"min_interval": 120,
"show_all_multiple_lines": false,
"items": ["space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"]
"items": ["pokemon_bag", "space_info", "pokeballs", "greatballs", "ultraballs", "razzberries", "luckyegg"]
}
},
{
Expand Down
9 changes: 9 additions & 0 deletions pokemongo_bot/cell_workers/update_live_inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class UpdateLiveInventory(BaseTask):
see available items below (defaults to []).
Available items :
'pokemon_bag' : pokemon in inventory (i.e. 'Pokemon Bag: 100/250')
'space_info': not an item but shows inventory bag space (i.e. 'Items: 140/350')
'pokeballs'
'greatballs'
Expand Down Expand Up @@ -148,6 +149,7 @@ def get_inventory_line(self, is_debug=False):
:rtype: string
"""
available_items = {
'pokemon_bag': 'Pokemon: {:,}/{:,}'.format(inventory.Pokemons.get_space_used(), inventory.get_pokemon_inventory_size()),
'space_info': 'Items: {:,}/{:,}'.format(self.inventory.get_space_used(),
self.inventory.get_space_used() + self.inventory.get_space_left()),
'pokeballs': 'Pokeballs: {:,}'.format(self.inventory.get(1).count),
Expand Down Expand Up @@ -201,6 +203,13 @@ def print_all(self):
:return: Nothing.
:rtype: None
"""
self.logger.info(
'Pokemon Bag: {}/{}'.format(
inventory.Pokemons.get_space_used(),
inventory.get_pokemon_inventory_size()
)
)

self.logger.info(
'Items: {}/{}'.format(
self.inventory.get_space_used(),
Expand Down

0 comments on commit 48cb861

Please sign in to comment.