Skip to content

Commit

Permalink
Fix some issues with merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
FGlazov committed Jun 10, 2021
1 parent 18368e9 commit 4941501
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 8 deletions.
36 changes: 32 additions & 4 deletions src/mod_rating_by_type/templates/pilot.html
Original file line number Diff line number Diff line change
Expand Up @@ -224,23 +224,51 @@
<div class="num">{{ player.gk_total }}</div>
</div>

{% if player.killboard_pve.tank_heavy %}
{% if player.killboard_pvp.tank_heavy %}
<div class="sub_item">
<div class="name">{% trans 'Heavy Tanks' context 'total' %}</div>
<div class="num">{{ player.killboard_pvp.tank_heavy }}</div>
</div>
{% endif %}

{% if player.killboard_pvp.tank_medium %}
<div class="sub_item">
<div class="name">{% trans 'Medium Tanks' context 'total' %}</div>
<div class="num">{{ player.killboard_pvp.tank_medium }}</div>
</div>
{% endif %}

{% if player.killboard_pvp.tank_light %}
<div class="sub_item">
<div class="name">{% trans 'Light Tanks' context 'total' %}</div>
<div class="num">{{ player.killboard_pvp.tank_light }}</div>
</div>
{% endif %}

{% if player.killboard_pvp.truck %}
<div class="sub_item">
<div class="name">{% trans 'Trucks' context 'total' %}</div>
<div class="num">{{ player.killboard_pvp.truck }}</div>
</div>
{% endif %}

{% if player.killboard_pve.tank_heavy %}
<div class="sub_item">
<div class="name">{% trans 'Heavy Tanks' context 'total' %} ({% trans 'AI' context 'total' %})</div>
<div class="num">{{ player.killboard_pve.tank_heavy }}</div>
</div>
{% endif %}

{% if player.killboard_pve.tank_medium %}
<div class="sub_item">
<div class="name">{% trans 'Medium Tanks' context 'total' %}</div>
<div class="name">{% trans 'Medium Tanks' context 'total' %} ({% trans 'AI' context 'total' %})</div>
<div class="num">{{ player.killboard_pve.tank_medium }}</div>
</div>
{% endif %}

{% if player.killboard_pve.tank_light %}
<div class="sub_item">
<div class="name">{% trans 'Light Tanks' context 'total' %}</div>
<div class="name">{% trans 'Light Tanks' context 'total' %} ({% trans 'AI' context 'total' %})</div>
<div class="num">{{ player.killboard_pve.tank_light }}</div>
</div>
{% endif %}
Expand All @@ -261,7 +289,7 @@

{% if player.killboard_pve.truck %}
<div class="sub_item">
<div class="name">{% trans 'Trucks' context 'total' %}</div>
<div class="name">{% trans 'Trucks' context 'total' %} ({% trans 'AI' context 'total' %})</div>
<div class="num">{{ player.killboard_pve.truck }}</div>
</div>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion src/mod_rating_by_type/templates/pilot_sortie.html
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
<div class="right">&nbsp;</div>
</div>

{% if sortie.killboard_pvp.tank_heavy %}
{% if sortie.killboard_pvp.tank_heavy %}
<div class="sub_row">
<div class="left">
{% trans 'Heavy Tanks' context 'total' %}
Expand Down
8 changes: 5 additions & 3 deletions src/stats/stats_whore.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
WIN_SCORE_RATIO = settings.WIN_SCORE_RATIO
SORTIE_MIN_TIME = settings.SORTIE_MIN_TIME

SORTIE_DISCO_MIN_TIME = settings.SORTIE_DISCO_MIN_TIME
SORTIE_DAMAGE_DISCO_TIME = settings.SORTIE_DAMAGE_DISCO_TIME

def main():
logger.info('IL2 stats {stats}, Python {python}, Django {django}'.format(
Expand Down Expand Up @@ -309,7 +311,7 @@ def stats_whore(m_report_file):
params['type'] = 'end'
params['act_object_id'] = event['sortie'].sortie_db.aircraft.id
params['act_sortie_id'] = event['sortie'].sortie_db.id
elif event['type'] == 'disco':
elif event['type'] == 'disco':
params['type'] = 'disco'
params['act_object_id'] = event['sortie'].sortie_db.aircraft.id
params['act_sortie_id'] = event['sortie'].sortie_db.id
Expand Down Expand Up @@ -479,8 +481,8 @@ def create_new_sortie(mission, profile, player, sortie, sortie_aircraft_id):
sortie.is_discobailout = True
sortie.is_disco = False
sortie.is_damageddisco = False


killboard_pvp = defaultdict(int)
killboard_pve = defaultdict(int)

Expand Down

0 comments on commit 4941501

Please sign in to comment.