Skip to content

Commit

Permalink
Merge branch 'release/3.5.0-b4'
Browse files Browse the repository at this point in the history
  • Loading branch information
aussig committed Feb 25, 2024
2 parents 201cbb7 + 896008b commit a761847
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Change Log

## v3.5.0-b4 - 2024-02-25

### Changes:

* No longer trigger automatic Discord embeds for all hyperlinks in the multi-CMDR report.

### Bug Fixes:

* The new simple trade total was giving incorrect combined profit.


## v3.5.0-b3 - 2024-02-24

### Bug Fixes:
Expand Down
2 changes: 1 addition & 1 deletion bgstally/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,7 @@ def _build_trade_text(self, trade_purchase: int, trade_profit: int, trade_buy: l
elif self.bgstally.state.DetailedTrade.get() == CheckStates.STATE_OFF:
# Modern, simple trade report - Combine buy at all brackets and profit at all brackets
buy_total:int = sum(int(d['value']) for d in trade_buy)
profit_total:int = sum(int(d['value']) for d in trade_sell)
profit_total:int = sum(int(d['profit']) for d in trade_sell)
text += f"{cyan('TrdBuy', fp=fp)} {green(human_format(buy_total), fp=fp)} " if buy_total != 0 else ""
text += f"{cyan('TrdProfit', fp=fp)} {green(human_format(profit_total), fp=fp)} " if profit_total != 0 else ""
else:
Expand Down
6 changes: 3 additions & 3 deletions bgstally/windows/cmdrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,16 @@ def _post_multiple_CMDRs_to_discord(self):
text += f"{datetime.strptime(cmdr.get('Timestamp'), DATETIME_FORMAT_JOURNAL).strftime(DATETIME_FORMAT_CMDRLIST)}: "

if 'inaraURL' in cmdr:
text += f" - [{cmdr.get('TargetName')}]({cmdr.get('inaraURL')})"
text += f" - [{cmdr.get('TargetName')}](<{cmdr.get('inaraURL')}>)"
else:
text += f" - {cmdr.get('TargetName')}"

text += f" - [{cmdr.get('System')}](https://inara.cz/elite/starsystem/?search={quote(cmdr.get('System'))}) - {cmdr.get('Ship')}"
text += f" - [{cmdr.get('System')}](<https://inara.cz/elite/starsystem/?search={quote(cmdr.get('System'))}>) - {cmdr.get('Ship')}"

if 'squadron' in cmdr:
squadron_info = cmdr.get('squadron')
if 'squadronName' in squadron_info and 'inaraURL' in squadron_info:
text += f" - [{squadron_info.get('squadronName')}]({squadron_info.get('inaraURL')})"
text += f" - [{squadron_info.get('squadronName')}](<{squadron_info.get('inaraURL')}>)"
text += "\n"

self.bgstally.discord.post_plaintext(text, None, DiscordChannel.CMDR_INFORMATION, None)
2 changes: 1 addition & 1 deletion load.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from bgstally.debug import Debug

PLUGIN_NAME = "BGS-Tally"
PLUGIN_VERSION = semantic_version.Version.coerce("3.5.0-b3")
PLUGIN_VERSION = semantic_version.Version.coerce("3.5.0-b4")

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

0 comments on commit a761847

Please sign in to comment.