From a50aa4647045e1cda06db1f3c7eb36105de5acd6 Mon Sep 17 00:00:00 2001 From: DeXtroTip Date: Thu, 18 Aug 2016 02:01:30 +0100 Subject: [PATCH 1/2] Added an option to show location in UpdateLiveStats --- pokemongo_bot/cell_workers/update_live_stats.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pokemongo_bot/cell_workers/update_live_stats.py b/pokemongo_bot/cell_workers/update_live_stats.py index ecfdeea6eb..7336f07b6d 100644 --- a/pokemongo_bot/cell_workers/update_live_stats.py +++ b/pokemongo_bot/cell_workers/update_live_stats.py @@ -56,6 +56,7 @@ class UpdateLiveStats(BaseTask): - stardust_earned : The number of earned stardust since the bot started. - 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. """ SUPPORTED_TASK_API_VERSION = 1 @@ -244,6 +245,7 @@ def _get_stats_line(self, player_stats): 'stardust_earned': 'Earned {:,} Stardust'.format(stardust_earned), 'highest_cp_pokemon': 'Highest CP pokemon : {}'.format(highest_cp_pokemon), 'most_perfect_pokemon': 'Most perfect pokemon : {}'.format(most_perfect_pokemon), + 'location': 'Location : ({:,}, {:,})'.format(self.bot.position[0], self.bot.position[1]) } def get_stat(stat): From be7aefd6229c116f1b2062c46ffed1816cc48d24 Mon Sep 17 00:00:00 2001 From: DeXtroTip Date: Thu, 18 Aug 2016 02:14:52 +0100 Subject: [PATCH 2/2] Fix error --- pokemongo_bot/cell_workers/update_live_stats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pokemongo_bot/cell_workers/update_live_stats.py b/pokemongo_bot/cell_workers/update_live_stats.py index 7336f07b6d..f4f10e3762 100644 --- a/pokemongo_bot/cell_workers/update_live_stats.py +++ b/pokemongo_bot/cell_workers/update_live_stats.py @@ -245,7 +245,7 @@ def _get_stats_line(self, player_stats): 'stardust_earned': 'Earned {:,} Stardust'.format(stardust_earned), 'highest_cp_pokemon': 'Highest CP pokemon : {}'.format(highest_cp_pokemon), 'most_perfect_pokemon': 'Most perfect pokemon : {}'.format(most_perfect_pokemon), - 'location': 'Location : ({:,}, {:,})'.format(self.bot.position[0], self.bot.position[1]) + 'location': 'Location : ({}, {})'.format(self.bot.position[0], self.bot.position[1]), } def get_stat(stat):