From: Ant Zucaro Date: Sat, 28 Oct 2017 14:18:09 +0000 (-0400) Subject: Show blanks along the diagonal. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=872ffb8652e767fc5401a46c4df6d8f09c51b539;p=xonotic%2Fxonstat.git Show blanks along the diagonal. --- diff --git a/xonstat/templates/frag_matrix.mako b/xonstat/templates/frag_matrix.mako index 47663c2..db08a05 100644 --- a/xonstat/templates/frag_matrix.mako +++ b/xonstat/templates/frag_matrix.mako @@ -6,31 +6,35 @@ % for pgstat in pgstats: - ${pgstat.nick_html_colors()|n} + ${pgstat.nick_html_colors()|n} % endfor % for fragger in pgstats: - - ${fragger.nick_html_colors()|n} - % for victim in pgstats: - <% - pgfm = matrix_by_pgstat_id.get(fragger.player_game_stat_id) - - victim_pgfm = matrix_by_pgstat_id.get(victim.player_game_stat_id) - if victim_pgfm: - victim_index = str(victim_pgfm.player_index) - else: - victim_index = "-1" - %> - - % if pgfm: - ${pgfm.matrix.get(victim_index, 0)} - % else: - 0 - % endif - % endfor - + + ${fragger.nick_html_colors()|n} + % for victim in pgstats: + % if fragger.player_game_stat_id == victim.player_game_stat_id: + + % else: + <% + pgfm = matrix_by_pgstat_id.get(fragger.player_game_stat_id) + + victim_pgfm = matrix_by_pgstat_id.get(victim.player_game_stat_id) + if victim_pgfm: + victim_index = str(victim_pgfm.player_index) + else: + victim_index = "-1" + %> + + % if pgfm: + ${pgfm.matrix.get(victim_index, 0)} + % else: + 0 + % endif + % endif + % endfor + % endfor