From 872ffb8652e767fc5401a46c4df6d8f09c51b539 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Sat, 28 Oct 2017 10:18:09 -0400 Subject: [PATCH] Show blanks along the diagonal. --- xonstat/templates/frag_matrix.mako | 46 ++++++++++++++++-------------- 1 file changed, 25 insertions(+), 21 deletions(-) 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 -- 2.39.2