diff --git a/CHANGELOG.md b/CHANGELOG.md index 56eb564..fa8c756 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## v3.1.0-b3 - 2023-088-12 + +### 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. + + ## v3.1.0-b2 - 2023-08-09 ### New Features: @@ -20,7 +31,7 @@ ### New Features: -* Thargoid War Revenant kills are now tracked. +* Thargoid War Revenant kills are now tracked (`R` in report). ### Changes: @@ -56,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/updatemanager.py b/bgstally/updatemanager.py index e664ed0..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 """ @@ -108,13 +108,13 @@ 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() + self._update_plugin() - def update_plugin(self): + def _update_plugin(self): """ Backup the old plugin and extract the new, ready for next launch """ 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))}, " \ 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)