Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added stardust per hour #5594

Merged
merged 1 commit into from
Sep 21, 2016
Merged
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
4 changes: 4 additions & 0 deletions pokemongo_bot/cell_workers/update_live_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class UpdateLiveStats(BaseTask):
- pokemon_stats : Puts together the pokemon encountered, caught, released, evolved and unseen.
- pokeballs_thrown : The number of thrown pokeballs.
- stardust_earned : The number of earned stardust since the bot started.
- stardust_per_hour : The estimated gain of stardust per hour
- highest_cp_pokemon : The caught pokemon with the highest CP since the bot started.
- most_perfect_pokemon : The most perfect caught pokemon since the bot started.
- location : The location where the player is located.
Expand Down Expand Up @@ -265,6 +266,7 @@ def _get_stats(self, player_stats):
pokemon_evolved = metrics.num_evolutions()
pokemon_unseen = metrics.num_new_mons()
pokeballs_thrown = metrics.num_throws()
dust_per_hour = int(metrics.stardust_per_hour())
stardust_earned = metrics.earned_dust()
highest_cp_pokemon = metrics.highest_cp['desc']
if not highest_cp_pokemon:
Expand Down Expand Up @@ -297,6 +299,7 @@ def _get_stats(self, player_stats):
'pokemon_unseen': pokemon_unseen,
'pokeballs_thrown': pokeballs_thrown,
'stardust_earned': stardust_earned,
'stardust_per_hour': dust_per_hour,
'highest_cp_pokemon': highest_cp_pokemon,
'most_perfect_pokemon': most_perfect_pokemon,
'location': [self.bot.position[0], self.bot.position[1]],
Expand Down Expand Up @@ -344,6 +347,7 @@ def _get_stats_line(self, player_stats):
),
'pokeballs_thrown': 'Threw {:,} pokeballs'.format(player_stats['pokeballs_thrown']),
'stardust_earned': 'Earned {:,} Stardust'.format(player_stats['stardust_earned']),
'stardust_per_hour': '{:,} Stardust/h'.format(player_stats['stardust_per_hour']),
'highest_cp_pokemon': 'Highest CP pokemon : {}'.format(player_stats['highest_cp_pokemon']),
'most_perfect_pokemon': 'Most perfect pokemon : {}'.format(player_stats['most_perfect_pokemon']),
'location': 'Location : ({}, {})'.format(*player_stats['location']),
Expand Down