X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=xonstat%2Ftemplates%2Fscoreboard.mako;h=44068d0f3bf2b956a6d411d3b97326ccb4523b95;hb=56b928c935f3114a3d9c12c2f97c15d45b0f293e;hp=5064bb1244a05d61883a02d484ee78d5a50d575b;hpb=de9c8abb10785f0944ffbb066826e1338dfcf029;p=xonotic%2Fxonstat.git
diff --git a/xonstat/templates/scoreboard.mako b/xonstat/templates/scoreboard.mako
index 5064bb1..44068d0 100644
--- a/xonstat/templates/scoreboard.mako
+++ b/xonstat/templates/scoreboard.mako
@@ -1,34 +1,38 @@
-<%def name="scoreboard(game_type_cd, pgstats, show_elo=False)">
-
-${scoreboard_header(game_type_cd, pgstats[0])}
+<%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 pgstat.avg_latency is not None:
-
- ${int(round(pgstat.avg_latency))}
- |
+ ${pgstat.nick_html_colors()|n}
% endif
- ${scoreboard_row(game_type_cd, pgstat)}
- ${pgstat.score} |
- % if show_elo:
- % if pgstat.elo_delta is not None:
- ${round(pgstat.elo_delta,2)} |
- % else:
- - |
- % endif
- % 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
@@ -36,102 +40,303 @@ ${scoreboard_header(game_type_cd, pgstats[0])}
##### SCOREBOARD HEADER #####
<%def name="scoreboard_header(game_type_cd, pgstat)">
-% if game_type_cd == 'dm' or game_type_cd == 'tdm' or game_type_cd == 'duel':
-
-
- Nick |
- % if pgstat.avg_latency is not None:
- Ping |
- % endif
- Kills |
- Deaths |
- Suicides |
- Score |
- % if show_elo:
- Elo Change |
- % endif
-
-
+% 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' 'rune' '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 pgstat.avg_latency is not None:
- Ping |
- % endif
- Kills |
- Captures |
- Pickups |
- FCK |
- Returns |
- Score |
- % if show_elo:
- Elo Change |
- % endif
-
-
+
+
+ Nick |
+ % if show_latency:
+ Ping |
+ % endif
+ Kills |
+ Captures |
+ Pickups |
+ FCK |
+ Returns |
+ Score |
+ % if show_elo:
+ Elo Change |
+ % endif
+
+
% endif
-% if game_type_cd == 'ca':
-
-
- Nick |
- % if pgstat.avg_latency is not None:
- Ping |
- % endif
- Kills |
- Score |
- % if show_elo:
- Elo Change |
- % endif
-
-
+% if game_type_cd == 'dom':
+
+
+ Nick |
+ % if show_latency:
+ Ping |
+ % endif
+ Kills |
+ Deaths |
+ Takes |
+ Ticks |
+ Score |
+ % if show_elo:
+ Elo Change |
+ % endif
+
+
% endif
-% if game_type_cd == 'freezetag':
-
-
- Nick |
- % if pgstat.avg_latency is not None:
- Ping |
- % endif
- Kills |
- Deaths |
- Suicides |
- Score |
- % if show_elo:
- Elo Change |
- % endif
-
-
+% if game_type_cd in 'ft' 'freezetag':
+
+
+ Nick |
+ % if show_latency:
+ Ping |
+ % endif
+ Kills |
+ Deaths |
+ Revivals |
+ Score |
+ % if show_elo:
+ Elo Change |
+ % endif
+
+
+% endif
+
+% if game_type_cd in 'ka' 'keepaway':
+
+
+ Nick |
+ % if show_latency:
+ Ping |
+ % endif
+ Kills |
+ Deaths |
+ Pickups |
+ BC Time |
+ BC Kills |
+ % if show_elo:
+ Elo Change |
+ % endif
+
+
+% endif
+
+% if game_type_cd == 'kh':
+
+
+ Nick |
+ % if show_latency:
+ Ping |
+ % endif
+ Kills |
+ Deaths |
+ Pickups |
+ Captures |
+ Losses |
+ Pushes |
+ Destroys |
+ KC Kills |
+ Score |
+ % if show_elo:
+ Elo Change |
+ % endif
+
+
+% endif
+
+% if game_type_cd in 'nb' 'nexball':
+
+
+ Nick |
+ % if show_latency:
+ Ping |
+ % endif
+ Goals |
+ Faults |
+ Score |
+ % if show_elo:
+ Elo Change |
+ % endif
+
+
+% endif
+
+% if game_type_cd == 'rc':
+
+
+ Nick |
+ % if show_latency:
+ Ping |
+ % endif
+ Laps |
+ Fastest Lap |
+ Time |
+
+
% endif
+
%def>
##### SCOREBOARD ROWS #####
<%def name="scoreboard_row(game_type_cd, pgstat)">
-% if game_type_cd == 'dm' or game_type_cd == 'tdm' or game_type_cd == 'duel':
- ${pgstat.kills} |
- ${pgstat.deaths} |
- ${pgstat.suicides} |
+% if game_type_cd == 'as':
+${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} |
+% endif
+
+% if game_type_cd == 'cq':
+${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} |
% 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} |
+% endif
+
+% if game_type_cd in 'ft' 'freezetag':
+${pgstat.kills} |
+${pgstat.deaths} |
+${pgstat.revivals} |
% endif
-% if game_type_cd == 'ca':
- ${pgstat.kills} |
+% 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.fckills} |
+% endif
+
+% if game_type_cd == 'kh':
+${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} |
+% endif
+
+% if game_type_cd == 'rc':
+${pgstat.laps} |
+
+% if pgstat.fastest is not None:
+${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)} |
+% else:
+- |
% endif
-% if game_type_cd == 'freezetag':
- ${pgstat.kills} |
- ${pgstat.deaths} |
- ${pgstat.suicides} |
+% if pgstat.time is not None:
+${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)} |
+% else:
+- |
+% endif
% endif
+
%def>