%def name="scoreboard(game_type_cd, pgstats, show_elo=False, show_latency=False)">
${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}
% 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
% endfor
%def>
##### SCOREBOARD HEADER #####
<%def name="scoreboard_header(game_type_cd, pgstat)">
% if game_type_cd == 'as':
Nick |
% if show_latency:
Ping |
% endif
Kills |
Deaths |
Suicides |
Objectives |
Score |
% if show_elo:
Elo Change |
% endif
% endif
% if game_type_cd in 'ca' 'dm' 'duel' 'tdm':
Nick |
% if show_latency:
Ping |
% endif
Kills |
Deaths |
Suicides |
Score |
% if show_elo:
Elo Change |
% endif
% endif
% if game_type_cd == 'cq':
Nick |
% if show_latency:
Ping |
% endif
Kills |
Deaths |
Captured |
Released |
Score |
% if show_elo:
Elo Change |
% endif
% endif
% if game_type_cd == 'cts':
Nick |
% if show_latency:
Ping |
% endif
Fastest Time |
Deaths |
% endif
% if game_type_cd == 'ctf':
Nick |
% if show_latency:
Ping |
% endif
Kills |
Captures |
Pickups |
FCK |
Returns |
Score |
% if show_elo:
Elo Change |
% endif
% endif
% if game_type_cd == 'freezetag':
Nick |
% if show_latency:
Ping |
% endif
Kills |
Deaths |
Suicides |
Score |
% if show_elo:
Elo Change |
% endif
% endif
%def>
##### SCOREBOARD ROWS #####
<%def name="scoreboard_row(game_type_cd, pgstat)">
% if game_type_cd == 'as':
${pgstat.kills} |
${pgstat.deaths} |
${pgstat.suicides} |
${pgstat.collects} |
% endif
% if game_type_cd in 'ca' 'dm' 'duel' 'tdm':
${pgstat.kills} |
${pgstat.deaths} |
${pgstat.suicides} |
% endif
% if game_type_cd == 'cq':
${pgstat.kills} |
${pgstat.deaths} |
${pgstat.captures} |
${pgstat.drops} |
% endif
% if game_type_cd == 'cts':
${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)} |
${pgstat.deaths} |
% endif
% if game_type_cd == 'ctf':
${pgstat.kills} |
${pgstat.captures} |
${pgstat.pickups} |
${pgstat.carrier_frags} |
${pgstat.returns} |
% endif
% if game_type_cd == 'freezetag':
${pgstat.kills} |
${pgstat.deaths} |
${pgstat.suicides} |
% endif
%def>