1
0
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:
Athanasius 2021-05-27 17:46:40 +01:00 committed by GitHub
commit 8a4e937a47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -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.

View File

@ -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"')