Skip to content

Commit

Permalink
Merge pull request #6 from goedzo/HealPokemon-Fix
Browse files Browse the repository at this point in the history
Heal pokemon fix
  • Loading branch information
goedzo authored Jul 17, 2017
2 parents e32cd14 + de9cb21 commit 3d5f6a0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pokemongo_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,8 @@ def _register_events(self):
self.event_manager.register_event('catch_limit')
self.event_manager.register_event('spin_limit')
self.event_manager.register_event('show_best_pokemon', parameters=('pokemons'))
self.event_manager.register_event('revived_pokemon')
self.event_manager.register_event('healing_pokemon')

# level up stuff
self.event_manager.register_event(
Expand Down
5 changes: 4 additions & 1 deletion pokemongo_bot/event_handlers/logging_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ class LoggingHandler(EventHandler):
'threw_pokeball': 'none',
'used_lucky_egg': 'none',
'catch_limit_on': 'yellow',
'catch_limit_off': 'green'
'catch_limit_off': 'green',
'revived_pokemon': 'green',
'healing_pokemon': 'green'

}
COLOR_CODE = {
'gray': '\033[90m',
Expand Down
5 changes: 5 additions & 0 deletions pokemongo_bot/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,11 @@ def add(self, pokemon):
raise ValueError("Pokemon already present in the inventory")
self._data[pokemon.unique_id] = pokemon

def get_from_unique_id(self, pokemon_unique_id):
if pokemon_unique_id not in self._data:
raise ValueError("Pokemon not present in the inventory")
return self._data[pokemon_unique_id]

def remove(self, pokemon_unique_id):
if pokemon_unique_id not in self._data:
raise ValueError("Pokemon not present in the inventory")
Expand Down

0 comments on commit 3d5f6a0

Please sign in to comment.