mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-14 16:27:13 +03:00
Suits: If user switches to an unknown loadout, say so
This commit is contained in:
parent
c28dd8c55d
commit
bb90d0fb59
@ -607,11 +607,13 @@ class AppWindow(object):
|
||||
def update_suit_text(self) -> None:
|
||||
"""Update the suit text for current type and loadout."""
|
||||
if (suit := monitor.state.get('SuitCurrent')) is None:
|
||||
self.suit['text'] = f'<{_("Unknown")}>'
|
||||
return
|
||||
|
||||
suitname = suit['locName']
|
||||
|
||||
if (suitloadout := monitor.state.get('SuitLoadoutCurrent')) is None:
|
||||
self.suit['text'] = ''
|
||||
return
|
||||
|
||||
loadout_name = suitloadout['name']
|
||||
|
@ -839,6 +839,8 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
|
||||
except KeyError:
|
||||
logger.exception(f"Getting suit loadout after switch, bad slot: {new_slot} ({loadoutid})")
|
||||
# Might mean that a new suit loadout was created and we need a new CAPI fetch ?
|
||||
self.state['SuitCurrent'] = None
|
||||
self.state['SuitLoadoutCurrent'] = None
|
||||
|
||||
else:
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user