From 57b378cd844ae9ae489fa3ef500bf1715e9cd622 Mon Sep 17 00:00:00 2001 From: Fedor Glazov Date: Mon, 21 Jun 2021 11:30:38 +0200 Subject: [PATCH] Fix bug with disconnect mod merge. --- changelog.txt | 6 +++++- src/mod_stats_by_aircraft/stats_whore.py | 4 ++++ src/stats/models.py | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/changelog.txt b/changelog.txt index 6641af0..b65c68d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -117,4 +117,8 @@ Version 1.5.4 Version 1.6.0 -- Update to 2.2.0 of enhancements, 1.3.0 of global aircraft stats. \ No newline at end of file +- Update to 2.2.0 of enhancements, 1.3.0 of global aircraft stats. + +Version 1.6.1 + +- Fix bug with bundling which caused disconnect mod to not end streaks of people who died by disconnecting. \ No newline at end of file diff --git a/src/mod_stats_by_aircraft/stats_whore.py b/src/mod_stats_by_aircraft/stats_whore.py index b648fb7..2817aa0 100644 --- a/src/mod_stats_by_aircraft/stats_whore.py +++ b/src/mod_stats_by_aircraft/stats_whore.py @@ -277,6 +277,10 @@ 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': + params['type'] = 'disco' + params['act_object_id'] = event['sortie'].sortie_db.aircraft.id + params['act_sortie_id'] = event['sortie'].sortie_db.id elif event['type'] == 'takeoff': params['type'] = 'takeoff' params['act_object_id'] = event['aircraft'].sortie.sortie_db.aircraft.id diff --git a/src/stats/models.py b/src/stats/models.py index 3c3ebbd..0593adf 100644 --- a/src/stats/models.py +++ b/src/stats/models.py @@ -1264,11 +1264,11 @@ def is_in_flight(self): # change added so when discobailout or damageddisco(when not shotdown) events = True, lost airplane for thouse sorties counts in total airplane lost for player @property def is_ditched(self): - return self.status == SortieStatus.crashed or self.is_captured or self.is_bailout + return self.status == SortieStatus.ditched @property def is_crashed(self): - return self.status == SortieStatus.crashed + return self.status == SortieStatus.crashed or self.is_captured or self.is_bailout @property def is_shotdown(self):