Skip to content

Commit ab5b672

Browse files
committed
fixing issues from trait page move and cargo restructure
1 parent a759a2c commit ab5b672

4 files changed

Lines changed: 12 additions & 9 deletions

File tree

main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
class Launcher():
88

9-
version = '2025.07b021'
10-
__version__ = '2.0'
9+
version = '2025.08b090'
10+
__version__ = '2.1'
1111

1212
# holds the style of the app
1313
theme = {

src/callbacks.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,13 +544,15 @@ def open_wiki_context(self):
544544
boff_id = self.context_menu.clicked_boff_station
545545
item = self.build[slot.environment][slot.type][boff_id][slot.index]
546546
if item is not None and item != '':
547-
open_wiki_page(f"Ability: {item['item']}")
547+
open_wiki_page(f"{item['item']}_(ability)")
548548
return
549549
item = self.build[slot.environment][slot.type][slot.index]
550550
if item is None or item == '':
551551
return
552-
if 'traits' in slot.type:
553-
open_wiki_page(f"Trait: {item['item']}")
552+
if slot.type == 'starship_traits':
553+
open_wiki_page(f"{item['item']}_(starship_trait)")
554+
elif 'traits' in slot.type:
555+
open_wiki_page(f"{item['item']}_({slot.environment}_trait)")
554556
else:
555557
open_wiki_page(f"{self.cache.equipment[slot.type][item['item']]['Page']}#{item['item']}")
556558

src/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
'text6,text7,text8,text9&limit=5000&format=json'
3737
)
3838
TRAIT_QUERY_URL = (
39-
WIKI_URL + 'Special:CargoExport?tables=Traits&fields=_pageName%3DPage,name,chartype,'
40-
'environment,type,isunique,description&limit=2500&format=json'
39+
WIKI_URL + 'Special:CargoExport?tables=Traits&fields=_pageName%3DPage,name,type,'
40+
'environment,description&limit=2500&format=json'
4141
)
4242
STARSHIP_TRAIT_QUERY_URL = (
4343
WIKI_URL + 'Special:CargoExport?tables=StarshipTraits&fields=_pageName%3DPage,name,short,type,'

src/datafunctions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def load_cargo_data(self, threaded_worker: ThreadObject):
185185
subhead_s = self.theme['tooltip']['trait_subheader']
186186
for trait in trait_cargo_data:
187187
name = trait['name']
188-
if trait['chartype'] == 'char' and name is not None:
188+
if trait['type'] != 'doff' and trait['type'] != 'boff' and name is not None:
189189
if trait['type'] == 'reputation':
190190
trait_type = 'rep'
191191
elif trait['type'] == 'activereputation':
@@ -201,7 +201,8 @@ def load_cargo_data(self, threaded_worker: ThreadObject):
201201
subhead_s, tags)
202202
}
203203
self.cache.images_set.add(name)
204-
except KeyError:
204+
# catch wrong values in trait['environment'] (cargo issue)
205+
except (KeyError, AttributeError):
205206
pass
206207
store_to_cache(self, self.cache.traits, 'traits.json')
207208

0 commit comments

Comments
 (0)