mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-23 12:20:30 +03:00
Merge pull request #1120 from EDCD/fix/1119/suit-name-unknown
Suits: Set edmcName in suits from CAPI, and ensure displayed
This commit is contained in:
commit
8a4e937a47
@ -983,6 +983,8 @@ class AppWindow(object):
|
||||
if play_sound and play_bad:
|
||||
hotkeymgr.play_bad()
|
||||
|
||||
self.update_suit_text()
|
||||
self.suit_show_if_set()
|
||||
self.cooldown()
|
||||
|
||||
def journal_event(self, event): # noqa: C901, CCR001 # Currently not easily broken up.
|
||||
|
@ -688,6 +688,13 @@ class Session(object):
|
||||
else:
|
||||
monitor.state['Suits'] = suits
|
||||
|
||||
# We need to be setting our edmcName for all suits
|
||||
loc_name = monitor.state['SuitCurrent'].get('locName', monitor.state['SuitCurrent']['name'])
|
||||
monitor.state['SuitCurrent']['edmcName'] = monitor.suit_sane_name(loc_name)
|
||||
for s in monitor.state['Suits']:
|
||||
loc_name = monitor.state['Suits'][s].get('locName', monitor.state['Suits'][s]['name'])
|
||||
monitor.state['Suits'][s]['edmcName'] = monitor.suit_sane_name(loc_name)
|
||||
|
||||
if (suit_loadouts := data.get('loadouts')) is None:
|
||||
logger.warning('CAPI data had "suit" but no (suit) "loadouts"')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user