Skip to content

Commit

Permalink
Merge branch 'release/4.0.0-b1'
Browse files Browse the repository at this point in the history
  • Loading branch information
aussig committed May 25, 2024
2 parents a842569 + daaeef2 commit c945984
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 9 deletions.
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,12 @@ If applicable, add screenshots to help explain your problem.
- Plugin Version [e.g. 1.2.0]
- EDMC Version [e.g. 5.1.3]

**Log Files**
Please attach the following three log files:

1. %LOCALAPPDATA%\Temp\EDMarketConnector\EDMarketConnector-debug.log - The folder containing this file can be found quickly by going to Help → Open Log Folder in EDMC.
2. %LOCALAPPDATA%\Temp\EDMarketConnector.log - This is in the parent folder to the file above.
3. %USERPROFILE%\Saved Games\Frontier Developments\Elite Dangerous\Journal.[latest date/time].log - The folder containing this file can be found quickly by going to File → Settings → Configuration in EDMC and looking at the file path shown in the E:D journal file location box.

**Additional context**
Add any other context about the problem here.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Change Log

## v4.0.0-b1 - 2024-05-25

### Changes:

* Update kill bond values for Thargoid interceptor kills for game version v18.06.

### Bug Fixes:

* Fleet Carrier window was failing to initialise if the carrier's current system wasn't set.
* Protect against rare situation where null data can cause the Activity window to fail to load.


## v4.0.0-a2 - 2024-05-16

### New Features:
Expand Down Expand Up @@ -57,7 +69,7 @@
* If any Discord post got bigger than the limits imposed by Discord, it would silently fail to post. Now, the post is truncated to the Discord limit and '...' appended to the end.
* The 'Post to Discord' button on the CMDRs information window was sometimes becoming enabled even if there were no valid discord webhooks set up.

### API Changes ([vx.x](https://studio-ws.apicur.io/sharing/xxxxxxxx)):
### API Changes ([v1.5](https://studio-ws.apicur.io/sharing/0f4472d2-d6b8-4718-8d38-205fc4539402)):

* `/activities` endpoint: Search and Rescue handins now included at `systems/[system]/factions/[faction]/sandr`, containing `damagedpods`, `occupiedpods`, `thargoidpods`, `blackboxes`, `wreckagecomponents`, `personaleffects`, `politicalprisoners` and `hostages` as properties.

Expand Down
15 changes: 14 additions & 1 deletion bgstally/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,17 @@
CZ_GROUND_LOW_CB_MAX = 5000
CZ_GROUND_MED_CB_MAX = 38000

TW_CBS = {25000: 'r', 65000: 's', 75000: 's', 1000000: 'ba', 4500000: 'sg', 6500000: 'c', 20000000: 'b', 25000000: 'o', 34000000: 'm', 40000000: 'o', 50000000: 'h'}
TW_CBS = {
25000: 'r', # Revenant
65000: 's', 75000: 's', # Scout
1000000: 'ba', # Banshee
4500000: 'sg', # Scythe and Glaive
6500000: 'c', 8000000: 'c', # Cyclops - 6.5m v14.02 / 8m v18.06
20000000: 'b', 24000000: 'b', # Basilisk - 20m v14.02 / 24m v18.06
40000000: 'o', 15000000: 'o', # Orthrus - 40m 03/2023 / 15m v18.06
34000000: 'm', # 40000000: 'm', # Medusa - 34m v14.02 / 40m v18.06
50000000: 'h', 60000000: 'h' # Hydra - 50m v14.02 / 60m v18.06
}


class Activity:
Expand Down Expand Up @@ -279,6 +289,9 @@ def system_entered(self, journal_entry: Dict, state: State):
"""
The user has entered a system
"""
# Protect against rare case of null data, not able to trace how this can happen
if journal_entry.get('SystemAddress') == None or journal_entry.get('StarSystem') == None: return

self.dirty = True
current_system = None

Expand Down
12 changes: 6 additions & 6 deletions bgstally/windows/fleetcarrier.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ def show(self):
fc: FleetCarrier = self.bgstally.fleet_carrier

self.toplevel = tk.Toplevel(self.bgstally.ui.frame)
self.toplevel.title(_("{plugin_name} - Carrier {carrier_name} ({carrier_callsign}) in system: {system_name}").format(plugin_name=self.bgstally.plugin_name, carrier_name=fc.name, carrier_callsign=fc.callsign, system_name=fc.data['currentStarSystem'])) # LANG: Carrier window title
self.toplevel.title(_("{plugin_name} - Carrier {carrier_name} ({carrier_callsign}) in system: {system_name}").format(plugin_name=self.bgstally.plugin_name, carrier_name=fc.name, carrier_callsign=fc.callsign, system_name=fc.data.get('currentStarSystem', "Unknown"))) # LANG: Carrier window title
self.toplevel.iconphoto(False, self.bgstally.ui.image_logo_bgstally_32, self.bgstally.ui.image_logo_bgstally_16)
self.toplevel.geometry("600x800")

container_frame:ttk.Frame = ttk.Frame(self.toplevel)
container_frame.pack(fill=tk.BOTH, expand=True)

ttk.Label(container_frame, text=_("System: {current_system} - Docking: {docking_access} - Notorious Allowed: {notorious}").format(current_system=fc.data['currentStarSystem'], docking_access=fc.human_format_dockingaccess(False), notorious=fc.human_format_notorious(False)), font=FONT_HEADING_1, foreground=COLOUR_HEADING_1).pack(anchor=tk.NW) # LANG: Label on carrier window
ttk.Label(container_frame, text=_("System: {current_system} - Docking: {docking_access} - Notorious Allowed: {notorious}").format(current_system=fc.data.get('currentStarSystem', "Unknown"), docking_access=fc.human_format_dockingaccess(False), notorious=fc.human_format_notorious(False)), font=FONT_HEADING_1, foreground=COLOUR_HEADING_1).pack(anchor=tk.NW) # LANG: Label on carrier window

items_frame:ttk.Frame = ttk.Frame(container_frame)
items_frame.pack(fill=tk.BOTH, padx=5, pady=5, expand=True)
Expand Down Expand Up @@ -126,11 +126,11 @@ def _post_to_discord(self):

fc: FleetCarrier = self.bgstally.fleet_carrier

title: str = __("Materials List for Carrier {carrier_name} in system: {system}", lang=self.bgstally.state.discord_lang).format(carrier_name=fc.name, system=fc.data['currentStarSystem']) # LANG: Discord fleet carrier title
title: str = __("Materials List for Carrier {carrier_name} in system: {system}", lang=self.bgstally.state.discord_lang).format(carrier_name=fc.name, system=fc.data.get('currentStarSystem', "Unknown")) # LANG: Discord fleet carrier title
description: str = self._get_as_text(fc, True)

fields: list = []
fields.append({'name': __("System", lang=self.bgstally.state.discord_lang), 'value': fc.data['currentStarSystem'], 'inline': True}) # LANG: Discord fleet carrier field heading
fields.append({'name': __("System", lang=self.bgstally.state.discord_lang), 'value': fc.data.get('currentStarSystem', "Unknown"), 'inline': True}) # LANG: Discord fleet carrier field heading
fields.append({'name': __("Docking", lang=self.bgstally.state.discord_lang), 'value': fc.human_format_dockingaccess(True), 'inline': True}) # LANG: Discord fleet carrier field heading
fields.append({'name': __("Notorious Access", lang=self.bgstally.state.discord_lang), 'value': fc.human_format_notorious(True), 'inline': True}) # LANG: Discord fleet carrier field heading

Expand All @@ -152,7 +152,7 @@ def _get_as_text(self, fc: FleetCarrier, short: bool = False) -> str:
text: str = ""

if not short:
text += "**" + __("Materials List for Carrier {carrier_name}", lang=self.bgstally.state.discord_lang).format(carrier_name=fc.name, system=fc.data['currentStarSystem']) + "**\n\n" # LANG: Discord fleet carrier title
text += "**" + __("Materials List for Carrier {carrier_name}", lang=self.bgstally.state.discord_lang).format(carrier_name=fc.name) + "**\n\n" # LANG: Discord fleet carrier title

materials_selling: str = fc.get_items_plaintext(FleetCarrierItemType.MATERIALS_SELLING)
materials_buying: str = fc.get_items_plaintext(FleetCarrierItemType.MATERIALS_BUYING)
Expand All @@ -169,7 +169,7 @@ def _get_as_text(self, fc: FleetCarrier, short: bool = False) -> str:
text += "**" + __("Buying Commodities:", lang=self.bgstally.state.discord_lang) + f"**\n```css\n{commodities_buying}```\n" # LANG: Discord fleet carrier section heading

if not short:
text += "**" + __("System", lang=self.bgstally.state.discord_lang) + "**: " + fc.data['currentStarSystem'] + "\n" # LANG: Discord fleet carrier discord post
text += "**" + __("System", lang=self.bgstally.state.discord_lang) + "**: " + fc.data.get('currentStarSystem', "Unknown") + "\n" # LANG: Discord fleet carrier discord post
text += "**" + __("Docking", lang=self.bgstally.state.discord_lang) + "**: " + fc.human_format_dockingaccess(True) + "\n" # LANG: Discord fleet carrier discord post
text += "**" + __("Notorious Access", lang=self.bgstally.state.discord_lang) + "**: " + fc.human_format_notorious(True) # LANG: Discord fleet carrier discord post

Expand Down
2 changes: 1 addition & 1 deletion load.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from bgstally.debug import Debug

PLUGIN_NAME = "BGS-Tally"
PLUGIN_VERSION = semantic_version.Version.coerce("4.0.0-a2")
PLUGIN_VERSION = semantic_version.Version.coerce("4.0.0-b1")

# Initialise the main plugin class
bgstally.globals.this = this = BGSTally(PLUGIN_NAME, PLUGIN_VERSION)
Expand Down

0 comments on commit c945984

Please sign in to comment.