From: Jan D. Behrens Date: Wed, 8 Aug 2012 11:07:12 +0000 (+0200) Subject: Add relative number of games / playing time to game breakdown X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=91b6c24374f877afa688cbaedcaa4339e62c404f;p=xonotic%2Fxonstat.git Add relative number of games / playing time to game breakdown --- diff --git a/xonstat/templates/player_info.mako b/xonstat/templates/player_info.mako index 291dcd0..e7b0405 100644 --- a/xonstat/templates/player_info.mako +++ b/xonstat/templates/player_info.mako @@ -450,19 +450,27 @@ Player Information - Games Played: - ${total} - + Games Played: + ${total} + % if gtc_key == 'overall': + + % else: + ${round(float(total)/total_stats['games'] * 100, 2)}% of all games + % endif Playing Time: ${alivetime} hours + % if gtc_key == 'overall': + % else: + ${round(float(alivetime.total_seconds())/total_stats['alivetime'].total_seconds() * 100, 2)}% of total playing time + % endif - Win Percentage: - ${round(float(wins)/total * 100, 2)}% - ${wins} wins, ${losses} losses + Win Percentage: + ${round(float(wins)/total * 100, 2)}% + ${wins} wins, ${losses} losses % if gtc_key == 'ctf':