From: Ant Zucaro Date: Sat, 16 Jun 2012 13:44:21 +0000 (-0400) Subject: Integrate the damage efficiency graph in player_info. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7ceb773ef64c3bff51fc1c325e3f203c439c43fc;p=xonotic%2Fxonstat.git Integrate the damage efficiency graph in player_info. It isn't complete yet, but it is much better than before, where new players would have a blank graph. Now it checks that the given player has *any* accuracy or damage based weapon usage and shows the graph accordingly. If the player does not have five games of either, the appropriate graph doesn't show. The incomplete part is that I'm not setting the default weapon to show (nex and rocket launcher). If a player plays, say, 10 games avoiding the rocket launcher then it will still show a blank graph b/c the rocket launcher is the default dmg weapon shown. This will be fixed, I just need to find a good way. --- diff --git a/xonstat/templates/player_info.mako b/xonstat/templates/player_info.mako index 8216f75..24ed905 100755 --- a/xonstat/templates/player_info.mako +++ b/xonstat/templates/player_info.mako @@ -13,6 +13,7 @@ ${nav.nav('players')} % endif @@ -132,14 +201,14 @@ Player Information -% if accs is not None: +% if 'nex' in recent_weapons or 'rifle' in recent_weapons or 'minstanex' in recent_weapons or 'uzi' in recent_weapons or 'shotgun' in recent_weapons:

Accuracy

-
+
    % if 'nex' in recent_weapons:
  • @@ -198,6 +267,83 @@ Player Information % endif +% if 'rocketlauncher' in recent_weapons or 'grenadelauncher' in recent_weapons or 'electro' in recent_weapons or 'crylink' in recent_weapons or 'laser' in recent_weapons: +
    +
    +

    Damage Efficiency

    +
    +
    + +
    +
      + % if 'rocketlauncher' in recent_weapons: +
    • +
      + +

      Rocket

      + +
      +
    • + % endif + + % if 'grenadelauncher' in recent_weapons: +
    • +
      + +

      Mortar

      + +
      +
    • + % endif + + % if 'electro' in recent_weapons: +
    • +
      + +

      Electro

      + +
      +
    • + % endif + + % if 'crylink' in recent_weapons: +
    • +
      + +

      Crylink

      + +
      +
    • + % endif + + % if 'hagar' in recent_weapons: +
    • +
      + +

      Hagar

      + +
      +
    • + % endif + + % if 'laser' in recent_weapons: +
    • +
      + +

      Laser

      + +
      +
    • + % endif + +
    +
    + +
    +
    +% endif + + ##### RECENT GAMES (v2) #### % if recent_games: