From: Ant Zucaro Date: Sat, 20 Jul 2013 15:06:41 +0000 (-0400) Subject: Fix display of KA games. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c69da0258f6a846b428a19b4e9c4f09e9b711ce3;p=xonotic%2Fxonstat.git Fix display of KA games. --- diff --git a/xonstat/templates/scoreboard.mako b/xonstat/templates/scoreboard.mako index 44068d0..9fb311c 100644 --- a/xonstat/templates/scoreboard.mako +++ b/xonstat/templates/scoreboard.mako @@ -3,36 +3,39 @@ ${scoreboard_header(game_type_cd, pgstats[0])} % for pgstat in pgstats: - - - % if pgstat.player_id > 2: - - ${pgstat.nick_html_colors()|n} - - % else: - ${pgstat.nick_html_colors()|n} + + + % if pgstat.player_id > 2: + + ${pgstat.nick_html_colors()|n} + + % else: + ${pgstat.nick_html_colors()|n} + % endif + + % if show_latency and pgstat.avg_latency is not None: + + ${int(round(pgstat.avg_latency))} + + % elif show_latency: + % endif - - % if show_latency and pgstat.avg_latency is not None: - - ${int(round(pgstat.avg_latency))} - - % elif show_latency: - - % endif - ${scoreboard_row(game_type_cd, pgstat)} - % if game_type_cd != 'cts': - ${pgstat.score} - % endif - % if show_elo: - % if pgstat.elo_delta is not None: - ${round(pgstat.elo_delta,2)} - % else: - - - % endif - % endif - + + ${scoreboard_row(game_type_cd, pgstat)} + + % if game_type_cd != 'cts': + ${pgstat.score} + % endif + + % if show_elo: + % if pgstat.elo_delta is not None: + ${round(pgstat.elo_delta,2)} + % else: + - + % endif + % endif + % endfor @@ -178,6 +181,7 @@ Pickups BC Time BC Kills + Score % if show_elo: Elo Change % endif @@ -244,99 +248,100 @@ ##### SCOREBOARD ROWS ##### <%def name="scoreboard_row(game_type_cd, pgstat)"> % if game_type_cd == 'as': -${pgstat.kills} -${pgstat.deaths} -${pgstat.suicides} -${pgstat.collects} + ${pgstat.kills} + ${pgstat.deaths} + ${pgstat.suicides} + ${pgstat.collects} % endif % if game_type_cd in 'ca' 'dm' 'duel' 'rune' 'tdm': -${pgstat.kills} -${pgstat.deaths} -${pgstat.suicides} + ${pgstat.kills} + ${pgstat.deaths} + ${pgstat.suicides} % endif % if game_type_cd == 'cq': -${pgstat.kills} -${pgstat.deaths} -${pgstat.captures} -${pgstat.drops} + ${pgstat.kills} + ${pgstat.deaths} + ${pgstat.captures} + ${pgstat.drops} % endif % if game_type_cd == 'cts': -% if pgstat.fastest is not None: -${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)} -% else: -- -% endif -${pgstat.deaths} + % if pgstat.fastest is not None: + ${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)} + % else: + - + % endif + + ${pgstat.deaths} % endif % if game_type_cd == 'ctf': -${pgstat.kills} -${pgstat.captures} -${pgstat.pickups} -${pgstat.carrier_frags} -${pgstat.returns} + ${pgstat.kills} + ${pgstat.captures} + ${pgstat.pickups} + ${pgstat.carrier_frags} + ${pgstat.returns} % endif % if game_type_cd == 'dom': -${pgstat.kills} -${pgstat.deaths} -${pgstat.pickups} -${pgstat.drops} + ${pgstat.kills} + ${pgstat.deaths} + ${pgstat.pickups} + ${pgstat.drops} % endif % if game_type_cd in 'ft' 'freezetag': -${pgstat.kills} -${pgstat.deaths} -${pgstat.revivals} + ${pgstat.kills} + ${pgstat.deaths} + ${pgstat.revivals} % endif % if game_type_cd in 'ka' 'keepaway': -${pgstat.kills} -${pgstat.deaths} -${pgstat.pickups} - -% if pgstat.time is not None: -${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)} -% else: -- -% endif + ${pgstat.kills} + ${pgstat.deaths} + ${pgstat.pickups} -${pgstat.fckills} + % if pgstat.time is not None: + ${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)} + % else: + - + % endif + + ${pgstat.carrier_frags} % endif % if game_type_cd == 'kh': -${pgstat.kills} -${pgstat.deaths} -${pgstat.pickups} -${pgstat.captures} -${pgstat.drops} -${pgstat.pushes} -${pgstat.destroys} -${pgstat.carrier_frags} + ${pgstat.kills} + ${pgstat.deaths} + ${pgstat.pickups} + ${pgstat.captures} + ${pgstat.drops} + ${pgstat.pushes} + ${pgstat.destroys} + ${pgstat.carrier_frags} % endif % if game_type_cd in 'nb' 'nexball': -${pgstat.captures} -${pgstat.drops} + ${pgstat.captures} + ${pgstat.drops} % endif % if game_type_cd == 'rc': -${pgstat.laps} + ${pgstat.laps} -% if pgstat.fastest is not None: -${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)} -% else: -- -% endif + % if pgstat.fastest is not None: + ${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)} + % else: + - + % endif -% if pgstat.time is not None: -${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)} -% else: -- -% endif + % if pgstat.time is not None: + ${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)} + % else: + - + % endif % endif