mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-07 10:53:26 +03:00
AppWindow.capi_request_data: Specific "We're aborting query" messages
This commit is contained in:
parent
50db6c528a
commit
d1dbd9da8f
@ -904,14 +904,35 @@ class AppWindow(object):
|
|||||||
auto_update = not event
|
auto_update = not event
|
||||||
play_sound = (auto_update or int(event.type) == self.EVENT_VIRTUAL) and not config.get_int('hotkey_mute')
|
play_sound = (auto_update or int(event.type) == self.EVENT_VIRTUAL) and not config.get_int('hotkey_mute')
|
||||||
|
|
||||||
if (
|
if not monitor.cmdr:
|
||||||
not monitor.cmdr or not monitor.mode or monitor.state['Captain']
|
logger.trace_if('capi.worker', 'Aborting Query: Cmdr unknown')
|
||||||
or not monitor.system or monitor.mode == 'CQC'
|
# LANG: CAPI queries aborted because Cmdr name is unknown
|
||||||
):
|
self.status['text'] = _('CAPI query aborted: Cmdr name unknown')
|
||||||
logger.trace_if('capi.worker', 'CQC detected, aborting query')
|
return
|
||||||
|
|
||||||
|
if not monitor.mode:
|
||||||
|
logger.trace_if('capi.worker', 'Aborting Query: Game Mode unknown')
|
||||||
|
# LANG: CAPI queries aborted because game mode unknown
|
||||||
|
self.status['text'] = _('CAPI query aborted: Game mode unknown')
|
||||||
|
return
|
||||||
|
|
||||||
|
if not monitor.system:
|
||||||
|
logger.trace_if('capi.worker', 'Aborting Query: Current star system unknown')
|
||||||
|
# LANG: CAPI queries aborted because current star system name unknown
|
||||||
|
self.status['text'] = _('CAPI query aborted: Current system unknown')
|
||||||
|
return
|
||||||
|
|
||||||
|
if monitor.state['Captain']:
|
||||||
|
logger.trace_if('capi.worker', 'Aborting Query: In multi-crew')
|
||||||
|
# LANG: CAPI queries aborted because player is in multi-crew on other Cmdr's ship
|
||||||
|
self.status['text'] = _('CAPI query aborted: In other-ship multi-crew')
|
||||||
|
return
|
||||||
|
|
||||||
|
if monitor.mode == 'CQC':
|
||||||
|
logger.trace_if('capi.worker', 'Aborting Query: In CQC')
|
||||||
# LANG: CAPI queries aborted because player is in CQC (Arena)
|
# LANG: CAPI queries aborted because player is in CQC (Arena)
|
||||||
self.status['text'] = _('CQC detected, aborting CAPI query')
|
self.status['text'] = _('CAPI query aborted: CQC (Arena) detected')
|
||||||
return # In CQC or on crew - do nothing
|
return
|
||||||
|
|
||||||
if companion.session.state == companion.Session.STATE_AUTH:
|
if companion.session.state == companion.Session.STATE_AUTH:
|
||||||
logger.trace_if('capi.worker', 'Auth in progress? Aborting query')
|
logger.trace_if('capi.worker', 'Auth in progress? Aborting query')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user