From 17c543ed708214661207bba9f160c6015287e3b6 Mon Sep 17 00:00:00 2001 From: aussig Date: Thu, 10 Aug 2023 09:47:39 +0100 Subject: [PATCH 1/5] Add new section to CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56eb564..e609a6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## v3.1.0-xx - xxxx-xx-xx + + + ## v3.1.0-b2 - 2023-08-09 ### New Features: From 305b3fe0e07fd128792e38841cd107302efa2944 Mon Sep 17 00:00:00 2001 From: aussig Date: Thu, 10 Aug 2023 10:01:23 +0100 Subject: [PATCH 2/5] Check for main UI frame before updating status text. --- CHANGELOG.md | 3 +++ bgstally/updatemanager.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e609a6e..33ba311 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## v3.1.0-xx - xxxx-xx-xx +### Bug Fixes: + +* Check for main UI frame before attempting to update the status text. Protects against rare errors where the status bar was updated before the main window has fully initialised. ## v3.1.0-b2 - 2023-08-09 diff --git a/bgstally/updatemanager.py b/bgstally/updatemanager.py index e664ed0..055c172 100644 --- a/bgstally/updatemanager.py +++ b/bgstally/updatemanager.py @@ -108,7 +108,7 @@ def download_received(self, success:bool, response:Response, request:BGSTallyReq self.update_available = True # Update UI, deferred because we're in a thread - self.bgstally.ui.frame.after(1000, self.bgstally.ui.update_plugin_frame()) + if self.bgstally.ui.frame: self.bgstally.ui.frame.after(1000, self.bgstally.ui.update_plugin_frame()) # Perform update self.update_manager.update_plugin() From 608f937a36b16798dce475cdf1c24abfcd484fb6 Mon Sep 17 00:00:00 2001 From: aussig Date: Thu, 10 Aug 2023 10:10:50 +0100 Subject: [PATCH 3/5] Make internal updatemanager functions private --- bgstally/updatemanager.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bgstally/updatemanager.py b/bgstally/updatemanager.py index 055c172..215d155 100644 --- a/bgstally/updatemanager.py +++ b/bgstally/updatemanager.py @@ -49,10 +49,10 @@ def __init__(self, bgstally): except OSError as e: if e.errno != errno.EEXIST: return - self.bgstally.request_manager.queue_request(URL_PLUGIN_VERSION, RequestMethod.GET, callback=self.version_info_received) + self.bgstally.request_manager.queue_request(URL_PLUGIN_VERSION, RequestMethod.GET, callback=self._version_info_received) - def version_info_received(self, success:bool, response:Response, request:BGSTallyRequest): + def _version_info_received(self, success:bool, response:Response, request:BGSTallyRequest): """ Latest version info received from the server. Called from a Thread. """ @@ -83,10 +83,10 @@ def version_info_received(self, success:bool, response:Response, request:BGSTall if self.remote_version > self.bgstally.version: # Download the new release - self.bgstally.request_manager.queue_request(self.release_url, RequestMethod.GET, callback=self.download_received, stream=True) + self.bgstally.request_manager.queue_request(self.release_url, RequestMethod.GET, callback=self._download_received, stream=True) - def download_received(self, success:bool, response:Response, request:BGSTallyRequest): + def _download_received(self, success:bool, response:Response, request:BGSTallyRequest): """ The download request has initially returned. This is a streamed download so the actual receipt of the file must be chunked """ @@ -111,10 +111,10 @@ def download_received(self, success:bool, response:Response, request:BGSTallyReq if self.bgstally.ui.frame: self.bgstally.ui.frame.after(1000, self.bgstally.ui.update_plugin_frame()) # Perform update - self.update_manager.update_plugin() + self._update_plugin() - def update_plugin(self): + def _update_plugin(self): """ Backup the old plugin and extract the new, ready for next launch """ From 0fb7d513b016cbdc645bb169c4243db637697cec Mon Sep 17 00:00:00 2001 From: aussig Date: Sat, 12 Aug 2023 07:24:57 +0100 Subject: [PATCH 4/5] Add Scythe and Glaive kill tracking. Closes #126. --- CHANGELOG.md | 8 ++++++-- bgstally/activity.py | 4 ++-- bgstally/windows/activity.py | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33ba311..2532800 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## v3.1.0-xx - xxxx-xx-xx +### New Features: + +* Thargoid War Scythe and Glaive kills are now tracked (`S/G` in report). + ### Bug Fixes: * Check for main UI frame before attempting to update the status text. Protects against rare errors where the status bar was updated before the main window has fully initialised. @@ -27,7 +31,7 @@ ### New Features: -* Thargoid War Revenant kills are now tracked. +* Thargoid War Revenant kills are now tracked (`R` in report). ### Changes: @@ -63,7 +67,7 @@ ### New Features: -* Thargoid War kills are now tracked for each vessel type: `💀 (kills)`. But **please be aware**: BGS-Tally will only count a kill if it is logged in your game journal. This reliably happens if you solo kill a Thargoid, and sometimes happens when you kill in a Team or with others. However, when not solo-killing, this is **highly unreliable**. Please don't file a bug if you find your kills aren't being tallied when fighting with other CMDRs in the instance. +* Thargoid War kills are now tracked for each vessel type: `💀 (kills)`. But **please be aware**: BGS-Tally will only count a kill if it is logged in your game journal. This reliably happens if you solo kill a Thargoid, and usually happens (since game update 16) when you kill in a Team or with others. * Thargoid War Search and Rescue collection and hand-in tracking. BGS-Tally now tracks where you pick up occupied and damaged escape pods ⚰️, black boxes ⬛ and tissue samples 🌱. You can hand them in anywhere, but they are tallied in the system they were collected. * You can now delete CMDRs from the CMDR target list history. * Targets older than 90 days are automatically removed from the CMDR target list history. diff --git a/bgstally/activity.py b/bgstally/activity.py index 80d3c39..a817eea 100644 --- a/bgstally/activity.py +++ b/bgstally/activity.py @@ -71,7 +71,7 @@ CZ_GROUND_LOW_CB_MAX = 5000 CZ_GROUND_MED_CB_MAX = 38000 -TW_CBS = {25000: 'r', 65000: 's', 75000: 's', 6500000: 'c', 20000000: 'b', 25000000: 'o', 34000000: 'm', 50000000: 'h'} +TW_CBS = {25000: 'r', 65000: 's', 75000: 's', 4500000: 'sg', 6500000: 'c', 20000000: 'b', 25000000: 'o', 34000000: 'm', 50000000: 'h'} class Activity: @@ -743,7 +743,7 @@ def _get_new_tw_kills_data(self): """ Get a new data structure for storing Thargoid War Kills """ - return {'r': 0, 's': 0, 'c': 0, 'b': 0, 'm': 0, 'h': 0, 'o': 0} + return {'r': 0, 's': 0, 'sg': 0, 'c': 0, 'b': 0, 'm': 0, 'h': 0, 'o': 0} def _get_new_tw_sandr_data(self): diff --git a/bgstally/windows/activity.py b/bgstally/windows/activity.py index b766a5d..600a78f 100644 --- a/bgstally/windows/activity.py +++ b/bgstally/windows/activity.py @@ -655,6 +655,7 @@ def _generate_tw_system_discord_text(self, system:Dict): system_discord_text += f" 💀 (kills): " \ + f"{red('R')} x {green(system['TWKills'].get('r', 0))}, " \ + f"{red('S')} x {green(system['TWKills'].get('s', 0))}, " \ + + f"{red('S/G')} x {green(system['TWKills'].get('sg', 0))}, " \ + f"{red('C')} x {green(system['TWKills'].get('c', 0))}, " \ + f"{red('B')} x {green(system['TWKills'].get('b', 0))}, " \ + f"{red('M')} x {green(system['TWKills'].get('m', 0))}, " \ From 38453c99b95359d915ea5f7995ab88868fa4390c Mon Sep 17 00:00:00 2001 From: aussig Date: Sat, 12 Aug 2023 07:27:34 +0100 Subject: [PATCH 5/5] Update version number for release. --- CHANGELOG.md | 2 +- load.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2532800..fa8c756 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## v3.1.0-xx - xxxx-xx-xx +## v3.1.0-b3 - 2023-088-12 ### New Features: diff --git a/load.py b/load.py index 67f08ed..451b462 100644 --- a/load.py +++ b/load.py @@ -9,7 +9,7 @@ import semantic_version PLUGIN_NAME = "BGS-Tally" -PLUGIN_VERSION = semantic_version.Version.coerce("3.1.0-b2") +PLUGIN_VERSION = semantic_version.Version.coerce("3.1.0-b3") # Initialise the main plugin class this:BGSTally = BGSTally(PLUGIN_NAME, PLUGIN_VERSION)