Skip to content

Commit

Permalink
Merge branch 'release/4.0.0-b2'
Browse files Browse the repository at this point in the history
  • Loading branch information
aussig committed May 31, 2024
2 parents c945984 + 414229d commit d90a3d8
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 21 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

## v4.0.0-b2 - 2024-05-31

### Changes:

* Tidied up layout of Discord options on activity windows.
* Minor localisation tweaks to Spanish and Italian.


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

### Changes:
Expand Down Expand Up @@ -74,6 +82,13 @@
* `/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.


## v3.6.2 - 2024-05-30

### Changes:

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


## v3.6.1 - 2024-04-07

### Bug Fixes:
Expand Down
4 changes: 2 additions & 2 deletions L10n/es.strings
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"cargo" = "carga";

/* Label on legend window. [legend.py] */
"Cargo missions" = "Misiones de Carga";
"Cargo missions" = "Misiones de carga";

/* [_tksheet_main_table.py] */
"Clear contents" = "Borrar contenido";
Expand Down Expand Up @@ -344,7 +344,7 @@
"INARA INFORMATION AVAILABLE" = "INFORMACIÓN DE INARA DISPONIBLE";

/* Inara link. [activity.py] */
"Inara ⤴" = "Irara ⤴";
"Inara ⤴" = "Inara ⤴";

/* Label on CMDR window. [cmdrs.py] */
"Inara: " = "Inara: ";
Expand Down
4 changes: 2 additions & 2 deletions L10n/it.strings
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@
"Buying Commodities:" = "Acquisto di commodity:";

/* Label on carrier window. [fleetcarrier.py] */
"Buying Materials" = "Acquisto di Material";
"Buying Materials" = "Acquisto di Materiali";

/* Discord fleet carrier section heading. [fleetcarrier.py] */
"Buying Materials:" = "Acquisto di Material:";
"Buying Materials:" = "Acquisto di Materiali:";

/* Discord heading. [default.py] */
"cargo" = "carico";
Expand Down
10 changes: 5 additions & 5 deletions bgstally/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@
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
8000000: 'c', # Cyclops - 8m v18.06
24000000: 'b', # Basilisk - 24m v18.06
15000000: 'o', # Orthrus - 15m v18.06
40000000: 'm', # Medusa - 40m v18.06
60000000: 'h' # Hydra - 60m v18.06
}


Expand Down
11 changes: 6 additions & 5 deletions bgstally/activitymanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class ActivityManager:
def __init__(self, bgstally):
self.bgstally = bgstally

self.activity_data = []
self.current_activity = None
self.activity_data: list[Activity] = []
self.current_activity: Activity|None = None

self._load()
self._archive_old_activity()
Expand All @@ -46,14 +46,14 @@ def save(self):
activity.save(path.join(self.bgstally.plugin_dir, FOLDER_ACTIVITYDATA, activity.get_filename()))


def get_current_activity(self):
def get_current_activity(self) -> Activity|None:
"""
Get the latest Activity, i.e. current tick
"""
return self.current_activity


def get_previous_activities(self):
def get_previous_activities(self) -> list[Activity]:
"""
Get a list of previous Activities.
"""
Expand Down Expand Up @@ -136,11 +136,12 @@ def _archive_old_activity(self):
if not path.exists(archive_filepath): mkdir(archive_filepath)

# Split list, keep first KEEP_CURRENT_ACTIVITIES in
activity_to_archive = self.activity_data[KEEP_CURRENT_ACTIVITIES:]
activity_to_archive: list[Activity] = self.activity_data[KEEP_CURRENT_ACTIVITIES:]
self.activity_data = self.activity_data[:KEEP_CURRENT_ACTIVITIES]

for activity in activity_to_archive:
try:
Debug.logger.info(f"Archiving {activity.get_filename()}")
rename(path.join(self.bgstally.plugin_dir, FOLDER_ACTIVITYDATA, activity.get_filename()),
path.join(self.bgstally.plugin_dir, archive_filepath, activity.get_filename()))
except FileExistsError: # Destination exists
Expand Down
11 changes: 5 additions & 6 deletions bgstally/windows/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,11 @@ def show(self, activity: Activity):
frm_discordoptions = ttk.Frame(frm_discord)
frm_discordoptions.grid(row=2, column=2, padx=5, pady=5, sticky=tk.NW)
current_row = 1
ttk.Label(frm_discordoptions, text=_("Other Options")).grid(row=current_row, column=0, padx=10, sticky=tk.W) # LANG: Options group title
ttk.Checkbutton(frm_discordoptions, text=_("Abbreviate Faction Names"), variable=self.bgstally.state.AbbreviateFactionNames, onvalue=CheckStates.STATE_ON, offvalue=CheckStates.STATE_OFF, command=partial(self._option_change, activity)).grid(row=current_row, column=1, padx=10, sticky=tk.W); current_row += 1 # LANG: Checkbox label
ttk.Checkbutton(frm_discordoptions, text=_("Show Detailed INF"), variable=self.bgstally.state.DetailedInf, onvalue=CheckStates.STATE_ON, offvalue=CheckStates.STATE_OFF, command=partial(self._option_change, activity)).grid(row=current_row, column=1, padx=10, sticky=tk.W); current_row += 1 # LANG: Checkbox label
ttk.Checkbutton(frm_discordoptions, text=_("Include Secondary INF"), variable=self.bgstally.state.IncludeSecondaryInf, onvalue=CheckStates.STATE_ON, offvalue=CheckStates.STATE_OFF, command=partial(self._option_change, activity)).grid(row=current_row, column=1, padx=10, sticky=tk.W); current_row += 1 # LANG: Checkbox label
ttk.Checkbutton(frm_discordoptions, text=_("Show Detailed Trade"), variable=self.bgstally.state.DetailedTrade, onvalue=CheckStates.STATE_ON, offvalue=CheckStates.STATE_OFF, command=partial(self._option_change, activity)).grid(row=current_row, column=1, padx=10, sticky=tk.W); current_row += 1 # LANG: Checkbox label
ttk.Checkbutton(frm_discordoptions, text=_("Report Newly Visited System Activity By Default"), variable=self.bgstally.state.EnableSystemActivityByDefault, onvalue=CheckStates.STATE_ON, offvalue=CheckStates.STATE_OFF).grid(row=current_row, column=1, padx=10, sticky=tk.W); current_row += 1 # LANG: Checkbox label
ttk.Checkbutton(frm_discordoptions, text=_("Abbreviate Faction Names"), variable=self.bgstally.state.AbbreviateFactionNames, onvalue=CheckStates.STATE_ON, offvalue=CheckStates.STATE_OFF, command=partial(self._option_change, activity)).grid(row=current_row, column=0, padx=10, sticky=tk.W); current_row += 1 # LANG: Checkbox label
ttk.Checkbutton(frm_discordoptions, text=_("Show Detailed INF"), variable=self.bgstally.state.DetailedInf, onvalue=CheckStates.STATE_ON, offvalue=CheckStates.STATE_OFF, command=partial(self._option_change, activity)).grid(row=current_row, column=0, padx=10, sticky=tk.W); current_row += 1 # LANG: Checkbox label
ttk.Checkbutton(frm_discordoptions, text=_("Include Secondary INF"), variable=self.bgstally.state.IncludeSecondaryInf, onvalue=CheckStates.STATE_ON, offvalue=CheckStates.STATE_OFF, command=partial(self._option_change, activity)).grid(row=current_row, column=0, padx=10, sticky=tk.W); current_row += 1 # LANG: Checkbox label
ttk.Checkbutton(frm_discordoptions, text=_("Show Detailed Trade"), variable=self.bgstally.state.DetailedTrade, onvalue=CheckStates.STATE_ON, offvalue=CheckStates.STATE_OFF, command=partial(self._option_change, activity)).grid(row=current_row, column=0, padx=10, sticky=tk.W); current_row += 1 # LANG: Checkbox label
ttk.Checkbutton(frm_discordoptions, text=_("Report Newly Visited System Activity By Default"), variable=self.bgstally.state.EnableSystemActivityByDefault, onvalue=CheckStates.STATE_ON, offvalue=CheckStates.STATE_OFF).grid(row=current_row, column=0, padx=10, sticky=tk.W); current_row += 1 # LANG: Checkbox label

system_list = activity.get_ordered_systems()

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-b1")
PLUGIN_VERSION = semantic_version.Version.coerce("4.0.0-b2")

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

0 comments on commit d90a3d8

Please sign in to comment.