1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 17:42:20 +03:00

Detect when on-foot but no known station.

This will trigger the "Where are you?!" message, which now can happen.

I need to double-check this against live behaviour, and might move this
to a different check, as I think on live it's valid to query in-space.
This commit is contained in:
Athanasius 2021-04-03 22:43:04 +01:00
parent bc6557dd9c
commit 72d200f616

View File

@ -779,8 +779,9 @@ class AppWindow(object):
self.status['text'] = _("Who are you?!") # Shouldn't happen self.status['text'] = _("Who are you?!") # Shouldn't happen
elif (not data.get('lastSystem', {}).get('name') elif (not data.get('lastSystem', {}).get('name')
or (data['commander'].get('docked') or (data['commander'].get('docked') or monitor.state['OnFoot']
and not data.get('lastStarport', {}).get('name'))): # Only care if docked and not data.get('lastStarport', {}).get('name'))
or (monitor.state['OnFoot'] and data['lastStarport']['name'] != monitor.station)):
self.status['text'] = _("Where are you?!") # Shouldn't happen self.status['text'] = _("Where are you?!") # Shouldn't happen
elif not data.get('ship', {}).get('name') or not data.get('ship', {}).get('modules'): elif not data.get('ship', {}).get('name') or not data.get('ship', {}).get('modules'):