%inherit file="base.mako"/>
<%block name="title">
% if player:
Player Information for ${player.nick_html_colors()} -
% endif
${parent.title()}
%block>
% if player is None:
This player is so good we couldn't find him!
Seriously though, he probably doesn't exist...just a figment of your imagination. Carry on then!
% else:
${player.nick_html_colors()}
Joined: ${player.create_dt.strftime('%m/%d/%Y at %I:%M %p')}
% endif
##### ACCURACY #####
% if weapon_stats:
Accuracy
% for weapon_stat in weapon_stats:
<%
if weapon_stat[2] > 0:
damage_pct = round(float(weapon_stat[2])/weapon_stat[3]*100, 2)
else:
damage_pct = 0
if weapon_stat[4] > 0:
hit_pct = round(float(weapon_stat[4])/weapon_stat[5]*100, 2)
else:
hit_pct = 0
%>
## Note: the name of the image must match up with the weapon_cd
## entry of that weapon, else this won't work
|
${weapon_stat[0]} |
${weapon_stat[4]} |
${weapon_stat[5]} |
${hit_pct}% |
${weapon_stat[2]} |
${weapon_stat[3]} |
${damage_pct}% |
% endfor
% endif
##### RECENT GAMES #####
% if recent_games:
Recent Games
% for (gamestat, game, server, map) in recent_games:
#${game.game_id}: ${map.name} on ${server.name}
% endfor
More games played by ${player.nick_html_colors()}...
% endif